public async Task <ActionResult <SimpleUpsertDto> > UpdateStandardListAsync([FromBody] StandardListDto dto) { var domainObject = await _standardListRepository.GetByIdAsync(dto.Id); StandardListDto.From(dto, domainObject); domainObject = await _standardListRepository.UpdateAsync(domainObject, this.AppUserId.Value); return(SimpleUpsertDto.From(domainObject)); }
public async Task <ActionResult <StandardListDto> > GetStandardListAsync([FromRoute] Guid standardListId) { var domainObject = await _standardListRepository.GetStandardListWithChildrenAsync(standardListId); return(StandardListDto.From(domainObject)); }
public async Task <ActionResult <List <StandardListDto> > > GetAllStandardListsAsync() { var data = await _standardListRepository.ListAllAsync(); return(data.Select(o => StandardListDto.From(o)).OrderBy(o => o.StandardListName).ToList()); }