public ActionResult Create([Bind(Include = "Id,Title,City")] Restaurant restaurant) { if (ModelState.IsValid) { db.Restaurants.Add(restaurant); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(restaurant)); }
public ActionResult Create([Bind(Include = "Id,Comment,Rating")] Review review) { if (ModelState.IsValid) { db.Reviews.Add(review); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(review)); }