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

            return(View(resturant));
        }
Ejemplo n.º 2
0
 public void Add(Customer customer)
 {
     _resturantDb.Customers.Add(customer);
     _resturantDb.SaveChanges();
 }