public ActionResult Edit([Bind(Include = "Id,Path,Name")] Image image) { if (ModelState.IsValid) { db.Entry(image).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(image)); }
public ActionResult Edit([Bind(Include = "Id,carName,carNumber,carModel,registrationDate")] Car car) { if (ModelState.IsValid) { db.Entry(car).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(car)); }