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