public ActionResult Create(Restaurant restaurant)
        {
            try
            {
                restaurantManager.Add(restaurant);

                return RedirectToAction("Index");
            }
            catch
            {
                return View();
            }
        }
Esempio n. 2
0
 public void Update(Restaurant entity)
 {
     RestaurantRepo.Update(entity);
 }
 // GET: Restaurant/Create
 public ActionResult Create()
 {
     var rest = new Restaurant();
     return View(rest);
 }
Esempio n. 4
0
 public Restaurant Add(Restaurant entity)
 {
     RestaurantRepo.Add(entity);
     return entity;
 }