Ejemplo n.º 1
0
 public void Delete(int id)
 {
     using (var context = new ProjetoContext(_optionsBuilder.Options))
     {
         var entidade = context.Set <T>().Find(id);
         context.Remove(entidade);
         context.SaveChanges();
     }
 }
Ejemplo n.º 2
0
 public void Excluir(int tarefaId)
 {
     _tarefaRepository.Remove(_tarefaRepository.Tarefas.Find(tarefaId));
     _tarefaRepository.SaveChanges();
 }