Пример #1
0
 public ActionResult Edit([Bind(Include = "ID,cedula,nombre,apellido,edad,telefono,Correo,genero,estado,hobbies")] Formulario formulario)
 {
     if (ModelState.IsValid)
     {
         db.Entry(formulario).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(formulario));
 }
Пример #2
0
 public ActionResult Edit([Bind(Include = "ID,Cedula,Nombre,Apellido,Edad,Telefono,Correo,Genero,EstadoCivil")] Formulario formulario)
 {
     if (ModelState.IsValid)
     {
         db.Entry(formulario).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(formulario));
 }
Пример #3
0
 public void Update(TEntity obj)
 {
     Db.Entry(obj).State = EntityState.Modified;
     Db.SaveChanges();
 }