public ActionResult Create(Resturant resturant)
        {
            if (ModelState.IsValid)
            {
                _db.Resturants.Add(resturant);
                _db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(resturant));
        }
Пример #2
0
 public void Add(Customer customer)
 {
     _resturantDb.Customers.Add(customer);
     _resturantDb.SaveChanges();
 }