public void Atualiza(Exercicio exercicio) { using (var contexto = new SoftnessContext()) { contexto.Exercicios.Update(exercicio); contexto.SaveChanges(); } }
public void Adiciona(Exercicio exercicio) { using (var context = new SoftnessContext()) { context.Exercicios.Add(exercicio); context.SaveChanges(); } }
public void Atualiza(CategoriaDoProduto categoria) { using (var contexto = new SoftnessContext()) { contexto.Entry(categoria).State = EntityState.Modified; contexto.SaveChanges(); } }
public void Atualiza(Produto produto) { using (var contexto = new SoftnessContext()) { contexto.Entry(produto).State = EntityState.Modified; contexto.SaveChanges(); } }
public void Adiciona(FichaTreino ficha) { using (var context = new SoftnessContext()) { context.FichaTreinos.Add(ficha); context.SaveChanges(); } }
public void Remover(Treino treino) { using (var context = new SoftnessContext()) { context.Treinos.Remove(treino); context.SaveChanges(); } }
public void Adiciona(Produto produto) { using (var context = new SoftnessContext()) { context.Produtos.Add(produto); context.SaveChanges(); } }
public void Adiciona(Treino treino) { using (var context = new SoftnessContext()) { context.Treinos.Add(treino); context.SaveChanges(); } }
public void Atualiza(Treino Treinos) { using (var contexto = new SoftnessContext()) { contexto.Entry(Treinos).State = EntityState.Modified; contexto.SaveChanges(); } }
public void Atualiza(Cliente cliente) { using (var contexto = new SoftnessContext()) { contexto.Clientes.Update(cliente); contexto.SaveChanges(); } }
public void Remover(FichaTreino ficha) { using (var context = new SoftnessContext()) { context.FichaTreinos.Remove(ficha); context.SaveChanges(); } }
public void Adiciona(Cliente cliente) { using (var context = new SoftnessContext()) { context.Clientes.Add(cliente); context.SaveChanges(); } }
public void Adiciona(CategoriaDoProduto categoria) { using (var context = new SoftnessContext()) { context.Categorias.Add(categoria); context.SaveChanges(); } }
public void Atualiza(Funcionario funcionario) { using (var contexto = new SoftnessContext()) { contexto.Funcionarios.Update(funcionario); contexto.SaveChanges(); } }
public void Adiciona(Funcionario funcionario) { using (var context = new SoftnessContext()) { context.Funcionarios.Add(funcionario); context.SaveChanges(); } }
public void Remover(int id) { using (var context = new SoftnessContext()) { var exercicio = new ExercicioDAO().BuscaPorId(id); context.Entry(exercicio).State = EntityState.Modified; context.SaveChanges(); } }
public void Remover(int id) { using (var context = new SoftnessContext()) { var cliente = new ClienteDAO().BuscaPorId(id); cliente.Ativo = false; context.Entry(cliente).State = EntityState.Modified; context.SaveChanges(); } }
public void Remover(int id) { using (var context = new SoftnessContext()) { var funcionario = new FuncionarioDAO().BuscaPorId(id); funcionario.Ativo = false; context.Entry(funcionario).State = EntityState.Modified; context.SaveChanges(); } }