public ActionResult Edit([Bind(Include = "VolanteId,NumSerie,CarroId")] Volante volante) { if (ModelState.IsValid) { db.Entry(volante).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.VolanteId = new SelectList(db.Carros, "CarroId", "NumSerieMotor", volante.VolanteId); return(View(volante)); }
public ActionResult Edit([Bind(Include = "AsientoId,NumSerie,CarroId")] Asiento asiento) { if (ModelState.IsValid) { db.Entry(asiento).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.CarroId = new SelectList(db.Carros, "CarroId", "NumSerieMotor", asiento.CarroId); return(View(asiento)); }
public ActionResult Edit([Bind(Include = "PropietarioId,DNI,Nombres,Apellidos,LicenciaConducir,CarroId")] Propietario propietario) { if (ModelState.IsValid) { db.Entry(propietario).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.PropietarioId = new SelectList(db.Carros, "CarroId", "NumSerieMotor", propietario.PropietarioId); return(View(propietario)); }
public ActionResult Edit([Bind(Include = "ParabrisasId,NumSerie,CarroId")] Parabrisas parabrisas) { if (ModelState.IsValid) { db.Entry(parabrisas).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.ParabrisasId = new SelectList(db.Carros, "CarroId", "NumSerieMotor", parabrisas.ParabrisasId); return(View(parabrisas)); }
public void StateModified(object Entity) { _Context.Entry(Entity).State = System.Data.Entity.EntityState.Modified; }