Beispiel #1
0
 public ActionResult Edit([Bind(Include = "Id,Nome,Email,DataNascimento")] Medico medico)
 {
     if (ModelState.IsValid)
     {
         db.Entry(medico).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(medico));
 }
Beispiel #2
0
 public ActionResult Edit([Bind(Include = "Id,Nome")] Cidade cidade)
 {
     if (ModelState.IsValid)
     {
         db.Entry(cidade).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(cidade));
 }
Beispiel #3
0
 public ActionResult Edit([Bind(Include = "Id,Nome,Email,ConfirmacaoEmail,Senha")] Usuario usuario)
 {
     if (ModelState.IsValid)
     {
         db.Entry(usuario).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(usuario));
 }