public HttpResponseMessage GetReportSectionDateRange(int UserId, DateTime FromDate, DateTime ToDate, int RouteId, int CarId, string Type) { try { using (CarSystemEntities db = new CarSystemEntities()) { var returnresult = db.prGetReportSectionDateRange(UserId, FromDate, ToDate, RouteId, CarId, Type).ToList();; return(Request.CreateResponse(HttpStatusCode.OK, returnresult)); } } catch (Exception ex) { return(Request.CreateResponse(HttpStatusCode.BadRequest, "System has failed to show information. Please try agian.")); } }