public ActionResult Create(Resturant resturant) { if (ModelState.IsValid) { _db.Resturants.Add(resturant); _db.SaveChanges(); return(RedirectToAction("Index")); } return(View(resturant)); }
public void Add(Customer customer) { _resturantDb.Customers.Add(customer); _resturantDb.SaveChanges(); }