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