示例#1
0
            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();
            }
示例#2
0
 public EntityFactory(SqlOdbcFactory database, string query = null)
 {
     db = database;
     q  = query;
 }