public ActionResult Edit([Bind(Include = "Id,Type")] VehicleTypes vehicleTypes) { if (ModelState.IsValid) { db.Entry(vehicleTypes).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(vehicleTypes)); }
public ActionResult Edit([Bind(Include = "Id,Year,Make,Model,QTY,VehicleId,FuelTankCapacity,Rating")] Vehicles vehicles) { if (ModelState.IsValid) { db.Entry(vehicles).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(vehicles)); }