public EntityEnum(SqlOdbcFactory database, string query = null) { db = database; conn = db.GetConnection(false); // nouvelle connexion pour les requetes imbriquées cmd = new OdbcCommand(); cmd.CommandTimeout = db.CommandTimeout; cmd.CommandText = String.IsNullOrEmpty(query) ? "SELECT * FROM " + (new T().TableName) : query; cmd.CommandType = CommandType.Text; cmd.Connection = conn; reader = cmd.ExecuteReader(); }
public EntityFactory(SqlOdbcFactory database, string query = null) { db = database; q = query; }