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