Example #1
0
        public ActionResult Create(Manfaat manfaat)
        {
            if (ModelState.IsValid)
            {
                db.Manfaats.Add(manfaat);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            return View(manfaat);
        }
Example #2
0
 public ActionResult Edit(Manfaat manfaat)
 {
     if (ModelState.IsValid)
     {
         db.Entry(manfaat).State = EntityState.Modified;
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     return View(manfaat);
 }