public ActionResult DeleteConfirmed(int id)
        {
            RestraurantType restraurantType = db.RestraurantTypes.Find(id);

            db.RestraurantTypes.Remove(restraurantType);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "RestraurantTypeId,RestraurantsType")] RestraurantType restraurantType)
 {
     if (ModelState.IsValid)
     {
         db.Entry(restraurantType).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(restraurantType));
 }
        public ActionResult Create([Bind(Include = "RestraurantTypeId,RestraurantsType")] RestraurantType restraurantType)
        {
            if (ModelState.IsValid)
            {
                db.RestraurantTypes.Add(restraurantType);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(restraurantType));
        }
        // GET: RestraurantTypes/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            RestraurantType restraurantType = db.RestraurantTypes.Find(id);

            if (restraurantType == null)
            {
                return(HttpNotFound());
            }
            return(View(restraurantType));
        }