public ActionResult Edit(Interest interest) { if (ModelState.IsValid) { context.Entry(interest).State = EntityState.Modified; context.SaveChanges(); return RedirectToAction("Index"); } return View(interest); }
public ActionResult Create(Interest interest) { if (ModelState.IsValid) { context.Interests.Add(interest); context.SaveChanges(); return RedirectToAction("Index"); } return View(interest); }