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