public async Task <ActionResult> Index(GetAllTrailsInput input) { var output = await _trailAppService.GetAll(input); var model = new IndexViewModel(output.Items); return(View(model)); }
public async Task <ListResultDto <TrailListDto> > GetAll(GetAllTrailsInput input) { var trails = await _trailRepository .GetAll() .Where(t => t.GiftId == input.GiftId) .OrderByDescending(t => t.CreationTime) .ToListAsync(); return(new ListResultDto <TrailListDto>(ObjectMapper.Map <List <TrailListDto> >(trails))); }