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