Using Typed Lists

When you create a Typed List definition in the designer, it will be generated as a Linq query and a typed class. The Linq query is created and returned by a method called GetTypedListNameTypedList, and which is located in the generated context class.

The typed list methods return an IQueryable<TypedListNameTypedListRow>. You can then use this queryable to append filters on the projection, append Take, Skip or for example an OrderBy call.

The generated TypedListNameTypedListRow classes are simple classes which contain properties which reflect the fields you added to the typed list definition in the designer.

In the example below, the typed list OrderCustomer is fetched and the first 10 rows are obtained from the actual resultset.

var ctxt = new NorthwindDataContext();
var results = ctxt.GetOrderCustomerTypedList().Take(10);