Пример #1
0
        public async Task <Response <List <HoursGeneralResponse> > > GetAsync(HoursFilterRequest filter)
        {
            var result = _mapper.Map <HoursFilters>(filter);

            var data = await _hoursService.GetAsync(result);

            return(new Response <List <HoursGeneralResponse> >(_mapper.Map <List <HoursGeneralResponse> >(data)));
        }
Пример #2
0
        public async Task <ActionResult> Get([FromQuery] HoursFilterRequest filters)
        {
            var response = await _hoursApplication.GetAsync(filters);

            if (response == null)
            {
                return(NoContent());
            }

            return(Ok(response.Data));
        }