public ActionResult Edicion([Bind(Include = "IdChofer,Marca,Modelo,Chofer,Matricula,Caracteristicas ")] Chofer Chofer) { if (ModelState.IsValid) { context.Entry(Chofer).State = EntityState.Modified; context.SaveChanges(); return(RedirectToAction("Index")); } return(View(Chofer)); }
public ActionResult Edit([Bind(Include = "IdVehiculo,IdChofer,Marca,Modelo,Matricula,Caracteristicas")] Vehiculo vehiculo) { if (ModelState.IsValid) { db.Entry(vehiculo).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.IdChofer = new SelectList(db.Choferes, "IdChofer", "Nombre", vehiculo.IdChofer); return(View(vehiculo)); }