/// <summary> /// In my Applcation dose not contant UI to generate report /// you can user Fiddler to call this Action methods /// /// this is requsit Body /// User-Agent: Fiddler /// Content-Type: text/xml /// Host: localhost:15621 ///Content-Length: 232 ///<EMonthlyReportDto> ///<NumberRead>100</NumberRead> ///<ClickThruRate>3.5</ClickThruRate> ///<NumberSent>2700</NumberSent> ///<AverageQuote>117</AverageQuote> ///<ProjectedConversationRate>2.1</ProjectedConversationRate> ///</EMonthlyReportDto> /// </summary> /// <param name="monthlyReportDto"></param> /// <returns></returns> public ActionResult MonthlyReport(EMonthlyReportDto monthlyReportDto) { if (ModelState.IsValid) { _eMonthlyReportService.Create(monthlyReportDto); return(Content("OK")); } return(Content("Error")); }
public void Create(EMonthlyReportDto eMonthlyReportDto) { _repositoryEMonthlyReport.Create(Mapper.Map <EMonthlyReport>(eMonthlyReportDto)); _repositoryEMonthlyReport.Save(); }