示例#1
0
 public void Atualiza(Exercicio exercicio)
 {
     using (var contexto = new SoftnessContext())
     {
         contexto.Exercicios.Update(exercicio);
         contexto.SaveChanges();
     }
 }
示例#2
0
 public void Adiciona(Exercicio exercicio)
 {
     using (var context = new SoftnessContext())
     {
         context.Exercicios.Add(exercicio);
         context.SaveChanges();
     }
 }
示例#3
0
 public void Atualiza(CategoriaDoProduto categoria)
 {
     using (var contexto = new SoftnessContext())
     {
         contexto.Entry(categoria).State = EntityState.Modified;
         contexto.SaveChanges();
     }
 }
示例#4
0
 public void Atualiza(Produto produto)
 {
     using (var contexto = new SoftnessContext())
     {
         contexto.Entry(produto).State = EntityState.Modified;
         contexto.SaveChanges();
     }
 }
示例#5
0
 public void Adiciona(FichaTreino ficha)
 {
     using (var context = new SoftnessContext())
     {
         context.FichaTreinos.Add(ficha);
         context.SaveChanges();
     }
 }
示例#6
0
 public void Remover(Treino treino)
 {
     using (var context = new SoftnessContext())
     {
         context.Treinos.Remove(treino);
         context.SaveChanges();
     }
 }
示例#7
0
 public void Adiciona(Produto produto)
 {
     using (var context = new SoftnessContext())
     {
         context.Produtos.Add(produto);
         context.SaveChanges();
     }
 }
示例#8
0
 public void Adiciona(Treino treino)
 {
     using (var context = new SoftnessContext())
     {
         context.Treinos.Add(treino);
         context.SaveChanges();
     }
 }
示例#9
0
 public void Atualiza(Treino Treinos)
 {
     using (var contexto = new SoftnessContext())
     {
         contexto.Entry(Treinos).State = EntityState.Modified;
         contexto.SaveChanges();
     }
 }
示例#10
0
 public void Atualiza(Cliente cliente)
 {
     using (var contexto = new SoftnessContext())
     {
         contexto.Clientes.Update(cliente);
         contexto.SaveChanges();
     }
 }
示例#11
0
 public void Remover(FichaTreino ficha)
 {
     using (var context = new SoftnessContext())
     {
         context.FichaTreinos.Remove(ficha);
         context.SaveChanges();
     }
 }
示例#12
0
 public void Adiciona(Cliente cliente)
 {
     using (var context = new SoftnessContext())
     {
         context.Clientes.Add(cliente);
         context.SaveChanges();
     }
 }
示例#13
0
 public void Adiciona(CategoriaDoProduto categoria)
 {
     using (var context = new SoftnessContext())
     {
         context.Categorias.Add(categoria);
         context.SaveChanges();
     }
 }
示例#14
0
 public void Atualiza(Funcionario funcionario)
 {
     using (var contexto = new SoftnessContext())
     {
         contexto.Funcionarios.Update(funcionario);
         contexto.SaveChanges();
     }
 }
示例#15
0
 public void Adiciona(Funcionario funcionario)
 {
     using (var context = new SoftnessContext())
     {
         context.Funcionarios.Add(funcionario);
         context.SaveChanges();
     }
 }
示例#16
0
 public void Remover(int id)
 {
     using (var context = new SoftnessContext())
     {
         var exercicio = new ExercicioDAO().BuscaPorId(id);
         context.Entry(exercicio).State = EntityState.Modified;
         context.SaveChanges();
     }
 }
示例#17
0
 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();
     }
 }
示例#18
0
 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();
     }
 }