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