Exemplo n.º 1
0
        public async Task <ActionResult> Index(GetAllTrailsInput input)
        {
            var output = await _trailAppService.GetAll(input);

            var model = new IndexViewModel(output.Items);

            return(View(model));
        }
Exemplo n.º 2
0
        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)));
        }