public ActionResult Edit(CustomerPhone customerphone) { if (ModelState.IsValid) { _db.ActivatePhoneNumber(customerphone.CustomerId, customerphone.Id); return RedirectToAction("Index"); } return View(customerphone); }
public ActionResult Create(CustomerPhone customerphone) { if (ModelState.IsValid) { db.CustomerPhones.Add(customerphone); db.SaveChanges(); return RedirectToAction("Index"); } return View(customerphone); }