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