6. IList<T> GetCollectionWithChildren(string query)

Returns all objects in the database for the specified type and their children.

Note

The query can be SQL or OQL (OQL is still under development).

Example:

IObjectMapper<Customer> mapper = Elementary.GetIObjectMapper<Customer>();

// Get all customers whose last name starts with "G"
IList<Customer> customers = mapper.GetCollectionWithChildren("LastName LIKE 'G%'");


Console.WriteLine(customers[0].Orders); // Orders is populated