public void Atualiza(Pedido Pedido) { using (var contexto = new LoginContext()) { contexto.Entry(Pedido).State = EntityState.Modified; contexto.SaveChanges(); } }
public void Adiciona(Pedido c) { using (var context = new LoginContext()) { c.Id = 0; context.Pedido.Add(c); context.SaveChanges(); } }
public void Adiciona(Cliente c) { using (var context = new LoginContext()) { c.Id = 0; context.Cliente.Add(c); context.SaveChanges(); } }
public void Atualiza(Loja Loja) { using (var contexto = new LoginContext()) { Loja.Id = 0; contexto.Entry(Loja).State = EntityState.Modified; contexto.SaveChanges(); } }
public void Adiciona(Loja c) { using (var context = new LoginContext()) { c.Id = 0; context.Loja.Add(c); context.SaveChanges(); } }