Beispiel #1
0
        public static TestDefinitionCollection Where(WhereDelegate <TestDefinitionColumns> where, OrderBy <TestDefinitionColumns> orderBy = null, Database database = null)
        {
            database = database ?? Db.For <TestDefinition>();
            var results = new TestDefinitionCollection(database, database.GetQuery <TestDefinitionColumns, TestDefinition>(where, orderBy), true);

            return(results);
        }
Beispiel #2
0
        /// <summary>
        /// Return every record in the TestDefinition table.
        /// </summary>
        /// <param name="database">
        /// The database to load from or null
        /// </param>
        public static TestDefinitionCollection LoadAll(Database database = null)
        {
            Database         db  = database ?? Db.For <TestDefinition>();
            SqlStringBuilder sql = db.GetSqlStringBuilder();

            sql.Select <TestDefinition>();
            var results = new TestDefinitionCollection(db, sql.GetDataTable(db))
            {
                Database = db
            };

            return(results);
        }
Beispiel #3
0
        /// <summary>
        /// This method is intended to respond to client side Qi queries.
        /// Use of this method from .Net should be avoided in favor of
        /// one of the methods that take a delegate of type
        /// WhereDelegate&lt;TestDefinitionColumns&gt;.
        /// </summary>
        /// <param name="where"></param>
        /// <param name="database"></param>
        public static TestDefinitionCollection Where(QiQuery where, Database database = null)
        {
            var results = new TestDefinitionCollection(database, Select <TestDefinitionColumns> .From <TestDefinition>().Where(where, database));

            return(results);
        }