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