예제 #1
0
        public async Task <ActionResult <List <ApplicantViewModel> > > GetYoungersFromBrazil()
        {
            var search = new ApplicantSearch()
            {
                OlderThan = 25, Country = "Brazil"
            };
            var expression = _dummyUserService.Query().FilterExpression(search);
            var result     = _dummyUserService.Query().Apply(search);

            return(ResponseGet(await _mapper.ProjectTo <ApplicantViewModel>(result).ToListAsync()));
        }
예제 #2
0
        public async Task <ActionResult <List <ApplicantViewModel> > > Get([FromQuery] ApplicantSearch search)
        {
            var result = _dummyUserService.Query().Apply(search);

            return(ResponseGet(await _mapper.ProjectTo <ApplicantViewModel>(result).ToListAsync()));
        }