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