Beispiel #1
0
 public ActionResult Edit([Bind(Include = "Id,Nome,Cpf,Dt_Nascminento")] MotoristaEntity motoristaEntity)
 {
     if (ModelState.IsValid)
     {
         db.Entry(motoristaEntity).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(motoristaEntity));
 }
Beispiel #2
0
 public ActionResult Edit([Bind(Include = "Id,Nome,Placa")] CarroEntity carroEntity)
 {
     if (ModelState.IsValid)
     {
         db.Entry(carroEntity).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(carroEntity));
 }
 public ActionResult Edit([Bind(Include = "Id,Responsavel,Carro,IdMotorista")] ResponsavelEntity responsavelEntity)
 {
     if (ModelState.IsValid)
     {
         db.Entry(responsavelEntity).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(responsavelEntity));
 }