public void Atualiza(Estoque estoque) { using (var contexto = new WebEstoqueContext()) { contexto.Entry(estoque).State = System.Data.Entity.EntityState.Modified; contexto.SaveChanges(); } }
public void Atualizar(Mercadoria mercadoria) { using (var contexto = new WebEstoqueContext()) { contexto.Entry(mercadoria).State = System.Data.Entity.EntityState.Modified; contexto.SaveChanges(); } }