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