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