// PUT api/Restaurants/5
        public HttpResponseMessage PutvRestaurants(int id, vRestaurants vrestaurants)
        {
            if (!ModelState.IsValid)
            {
                return Request.CreateErrorResponse(HttpStatusCode.BadRequest, ModelState);
            }

            if (id != vrestaurants.id)
            {
                return Request.CreateResponse(HttpStatusCode.BadRequest);
            }

            db.Entry(vrestaurants).State = EntityState.Modified;

            try
            {
                db.SaveChanges();
            }
            catch (DbUpdateConcurrencyException ex)
            {
                return Request.CreateErrorResponse(HttpStatusCode.NotFound, ex);
            }

            return Request.CreateResponse(HttpStatusCode.OK);
        }
        // POST api/Restaurants
        public HttpResponseMessage PostvRestaurants(vRestaurants vrestaurants)
        {
            if (ModelState.IsValid)
            {
                db.vRestaurants.Add(vrestaurants);
                db.SaveChanges();

                HttpResponseMessage response = Request.CreateResponse(HttpStatusCode.Created, vrestaurants);
                response.Headers.Location = new Uri(Url.Link("DefaultApi", new { id = vrestaurants.id }));
                return response;
            }
            else
            {
                return Request.CreateErrorResponse(HttpStatusCode.BadRequest, ModelState);
            }
        }