public List <T> Listar() { using (var db = new SistemaDeEventosContext()) { return(db.Set <T>().Where(x => !x.FlagExcluido).ToList()); } }
public T Inserir(T modelo) { using (var db = new SistemaDeEventosContext()) { db.ChangeTracker.AutoDetectChangesEnabled = false; db.Set <T>().Add(modelo); db.SaveChanges(); return(modelo); } }