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