public async Task <IActionResult> GetAll([FromQuery] GetCostsRequest request) { try { var costs = await costService.GetAllAsync(); var response = new GetCostsResponse { Items = mapper.Map <List <CostDto> >(costs), Total = costs.Count }; return(Ok(response)); } catch (Exception e) { return(ExceptionResult(e)); } }