Represents a SELECT query used to select business objects from the database.
For a list of all members of this type, see SelectFrom<T> Members.
Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.
This sample demonstrates various ways of using SelectFrom<T> to load collections of objects. Then it shows how to load a collection by calling a stored procedure.
// Load a collection of persons with first name 'John' sorted by last name. List<Contact> contacts = SelectFrom<Contact>.All .Where("FirstName", Op.Equals, "John") .OrderBy("LastName") .Select(); Load the top ten rock albums for 2005 List<Album> albums = SelectFrom<Album>.Top(10) .Where("ReleaseDate" >= DatTime.Parse("1/1/2005")) .Where("CategoryID", Op.Equal, "Rock") .OrderBy("Sales", OrderDirection.Descending); .Select(); // Get the last entered phonenumber for an account PhoneNumber p = SelectFrom<PhoneNumber.>.Top(1) .Where("CrDate", Op.IsMax) .Where("AccountID", Op.Equals, this._accountID) .QueryOne(); // Load a collection of accounts in California that have orders. // NOTE: You need to use a stored procedure when the SELECT statement involves joins. List<Account> accountsInCalifornia = SelectFrom<Account> .StoredProcedure("sp_GetAccountsWithOrders", "CA") .Select();
Assembly: KREDOR.BOFramework (in KREDOR.BOFramework.dll)