/// <summary> /// Получить список шаблонов /// </summary> public async Task <List <CaseTypeDto> > GetCaseTypesInfoAsync() { using (_unitOfWork.Begin()) { IList <CaseType> types = await _caseTypeRepository.GetAll(); List <CaseTypeDto> typeDtos = types.Select(x => new CaseTypeDto { Id = x.Id, Title = x.GetTitle() }).ToList(); return(typeDtos); } }
public IEnumerable <CaseType> GetTypes() { return(_caseTypeRepository.GetAll()); }