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); }
/// <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); }
/// <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<TestDefinitionColumns>. /// </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); }