LanguageText AppService değişiklik
This commit is contained in:
parent
3086927146
commit
c6db98522e
2 changed files with 14 additions and 0 deletions
|
|
@ -1,4 +1,5 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Volo.Abp.Application.Dtos;
|
||||
using Volo.Abp.Application.Services;
|
||||
|
|
@ -14,4 +15,5 @@ public interface ILanguageTextAppService : ICrudAppService<
|
|||
Task<PagedResultDto<LanguageTextTranslatedDto>> GetLanguageTextTranslatedAsync(LanguageTextTranslatedRequestDto input);
|
||||
Task<LanguageTextDto> GetLanguageTextAsync(LanguageTextFilteredDto input);
|
||||
Task UpdateLanguageTextAsync(LanguageTextCreateUpdateDto input);
|
||||
Task<List<LanguageTextDto>> GetLanguageTextByCultureNameAsync(string CultureName);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ using Volo.Abp;
|
|||
using Volo.Abp.Application.Dtos;
|
||||
using Volo.Abp.Application.Services;
|
||||
using Volo.Abp.Auditing;
|
||||
using Volo.Abp.Domain.Entities;
|
||||
using Volo.Abp.Domain.Repositories;
|
||||
using Volo.Abp.Validation;
|
||||
|
||||
|
|
@ -113,6 +114,17 @@ public class LanguageTextAppService : CrudAppService<
|
|||
return ObjectMapper.Map<LanguageText, LanguageTextDto>(entity);
|
||||
}
|
||||
|
||||
public async Task<List<LanguageTextDto>> GetLanguageTextByCultureNameAsync(string CultureName)
|
||||
{
|
||||
var item = await _repositoryText.GetListAsync(a => a.CultureName == CultureName);
|
||||
if (item is null)
|
||||
{
|
||||
throw new EntityNotFoundException(L["RecordNotFound"]);
|
||||
}
|
||||
|
||||
return ObjectMapper.Map<List<LanguageText>, List<LanguageTextDto>>(item);
|
||||
}
|
||||
|
||||
protected virtual IQueryable<LanguageKey> ApplySorting(IQueryable<LanguageKey> query, LanguageTextTranslatedRequestDto input)
|
||||
{
|
||||
//Try to sort query if available
|
||||
|
|
|
|||
Loading…
Reference in a new issue