public ActionResult UpdateConfirmed(Livro _livro) { if (ModelState.IsValid) { db.Entry(_livro).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Query")); } return(View(_livro)); }
public ActionResult Edit([Bind(Include = "id,nome")] tb_estoque tb_estoque) { if (ModelState.IsValid) { db.Entry(tb_estoque).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(tb_estoque)); }
public void Editar(T entity) { ctx.Entry(entity).State = EntityState.Modified; }