Example #1
0
 public ActionResult Create(Restaurant restaurant)
 {
     if (!ModelState.IsValid)
     {
         return View(restaurant);
     }
     restaurantService.CreateRestaurant(restaurant);
     return RedirectToAction("Index");
 }
Example #2
0
 public RestaurantViewModel(Restaurant restaurant, IList<Dish> dishes)
 {
     Restaurant = restaurant;
     Dishes = dishes;
 }
Example #3
0
 //
 // GET: /Restaurant/Create
 public ActionResult Create()
 {
     Restaurant restautant = new Restaurant();
     return View(restautant);
 }
Example #4
0
 public void CreateRestaurant(Restaurant Restaurant)
 {
     RestaurantRepository.Add(Restaurant);
     unitOfWork.Commit();
 }