public ActionResult Create(Business business) { if (ModelState.IsValid) { db.Businesses.Add(business); db.SaveChanges(); return RedirectToAction("Index"); } return View(business); }
public ActionResult Edit(Business business) { if (ModelState.IsValid) { db.Entry(business).State = EntityState.Modified; db.SaveChanges(); return RedirectToAction("Index"); } return View(business); }