Beispiel #1
0
        public HttpResponseMessage GetCarType(int UserId)
        {
            try

            {
                using (CarSystemEntities db = new CarSystemEntities())
                {
                    var returnData = db.prGetCarTypes(UserId).ToList();
                    return(Request.CreateResponse(HttpStatusCode.OK, returnData));
                }
            }
            catch (Exception ex)
            {
                return(Request.CreateResponse(HttpStatusCode.BadRequest, "System has failed to show car type list. Please contact with admin."));
            }
        }