Tutorial by Examples

A basic QueryOver query is performed against an ISession using the QueryOver<T> method, where T is the type of a mapped entity. IList<Customer> customers = session.QueryOver<Customer>() .Where(c => c.LastName == "Simpson") .List();
To join and and for instance filter on the joined table use JoinQueryOver. IList<Customer> customers = session.QueryOver<Customer>() .Inner.JoinQueryOver(x => x.Organisation) .Where(y => y.Name == "Acme Inc") .List();
It's possible to use JoinAlias method to join several tables. It's useful when it's needed to specify some property from the joined table in the select statement: Customer customerAlias = null; Organization organizationAlias = null; IList<Customer> customers = session.QueryOver(() => c...

Page 1 of 1