コード例 #1
0
 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));
 }
コード例 #2
0
 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));
 }
コード例 #3
0
 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));
 }
コード例 #4
0
 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));
 }
コード例 #5
0
 public void StateModified(object Entity)
 {
     _Context.Entry(Entity).State = System.Data.Entity.EntityState.Modified;
 }