예제 #1
0
 public void ExecutarTarefa(T item, TipoOperacaoBd tipo)
 {
     using (var ctx = new ProjetoConnection())
     {
         ctx.Entry <T>(item).State = (EntityState)tipo;
         ctx.SaveChanges();
     }
 }
예제 #2
0
 public void ProcessarDB(T obj, TipoOperacaoBd tipo)
 {
     _eventosContext.Entry <T>(obj).State = (EntityState)tipo;
     _eventosContext.SaveChanges();
 }