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 ActionResult Edit([Bind(Include = "LlantaId,NumSerie,CarroId")] Llanta llanta) { if (ModelState.IsValid) { db.Entry(llanta).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.CarroId = new SelectList(db.Carros, "CarroId", "NumSerieMotor", llanta.CarroId); return(View(llanta)); }
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 void StateModified(object Entity) { _Context.Entry(Entity).State = System.Data.Entity.EntityState.Modified; }