public IHttpActionResult RunMonthlyPayrollReport(MonthlyPayrollReportParamsModel model) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } try { var paramsDto = Mapper.Map <MonthlyPayrollReportParamsDto>(model); var fileReadyFlag = _reportAppService.RunMonthlyPayrollReport(paramsDto); return(Ok(fileReadyFlag)); } catch (Exception ex) { return(BadRequest(ex.Message)); } }