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