public ActionResult Create(Restaurant restaurant) { if (ModelState.IsValid) { _dbData.AddData(restaurant); TempData["Msg"] = "Data saved successfully"; return(RedirectToAction("Details", new { id = restaurant.Id })); } return(View()); }