public HttpResponseMessage GetBusPaymentHistory(int UserId, DateTime FromDate, DateTime ToDate, int RouteId, string Type) { try { using (CarSystemEntities db = new CarSystemEntities()) { var returnresult = db.prGetBusPaymentHistory(UserId, FromDate, ToDate, RouteId, 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.")); } }