예제 #1
0
 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));
 }
예제 #2
0
 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));
 }