public IActionResult Get([FromQuery] ReportModel reportModel) { IActionResult result; if (reportModel.HasErrors()) { result = BadRequest(new ErrorModel(reportModel.Errors())); } else { result = Ok(ReportLogic.Search(reportModel)); } return(result); }