public ActionResult Create(Cuisine cuisine)
 {
     _db.Cuisines.Add(cuisine);
     _db.SaveChanges();
     return(RedirectToAction("Index"));
 }
示例#2
0
 public ActionResult Create(Restaurant restaurant)
 {
     _db.Restaurants.Add(restaurant);
     _db.SaveChanges();
     return(RedirectToAction("Index"));
 }
示例#3
0
 public ActionResult Create(Review review)
 {
     _db.Reviews.Add(review);
     _db.SaveChanges();
     return(RedirectToAction("Details", "Restaurants", new { id = review.RestaurantId }));
 }