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