Documentation of free .NET O/R Mapper - Code Generator Invist

Invist Supports sorting data in used loaded entities from database. The following sample demonstrates how to realize a statement with in Invist.

Sorter are located in Namespace: Invist.Persistence.Database.Sorter

SELECT * FROM Products ORDER BY Products.ProductName DESC, Products.UnitPrice ASC;

// using Invist.Persistence.Database.Entities
// using Invist.Persistence.Database.Sorter

IEntityLoader<Product> loader = new EntityLoader<Product>();

EntityPropertySorter sorter = new EntityPropertySorter();
sorter.Add( Product.ProductNameProperty, SortDirection.Descending );
sorter.Add(Product.UnitPriceProperty, SortDirection.Ascending);

IEnumerable<Product> list = loader.LoadEntities( sorter );

ScrewTurn Wiki version 2.0.35. Some of the icons created by FamFamFam. Invist is powered by Mirko Meier