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