public async Task <ActionResult> Edit([Bind(Include = "Id,Origem,Destino,ValorMin")] Valor valor) { if (ModelState.IsValid) { db.Entry(valor).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(valor)); }
public async Task <ActionResult> Edit([Bind(Include = "Id,Origem,Destino,Tempo,Plano,ValorMinuto")] Ligacao ligacao) { if (ModelState.IsValid) { db.Entry(ligacao).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(ligacao)); }
public void Update(TEntity obj) { Db.Entry(obj).State = EntityState.Modified; Db.SaveChanges(); }
public void Update(TEntity obj) { ctx.Entry(obj).State = System.Data.Entity.EntityState.Modified; ctx.SaveChanges(); }