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