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