Ayende @ Rahien

It's a girl

Linq For NHibernate: Orderring and Paging

Bobby Diaz has implemented orderring and paging support for Linq to NHibernate, so this works:

(from c in nwnd.Customers select c.CustomerID)

As well as this:

var query = from c in nwnd.Customers
   where c.Country == "Belgium"
   orderby c.Country descending, c.City descending
   select c.City;

Thanks again, Bobby, and the new code is on SVN.


03/20/2007 02:22 PM by

Linq is some neat stuff. Too bad that, if the VS 2005 dev time was any indication, we'll all have this around..oh...2010.

Richard LOPES
03/20/2007 09:57 PM by
Richard LOPES

This project is making a lot of progress... Fast !

Keep the good work and thanks.

Jon Stelly
03/22/2007 05:18 AM by
Jon Stelly

In an effort to help myself figure out what the expression trees look like when passed to an IQueryable, I put together a utility class that dumps an expression tree to XML. Hopefully others looking to contribute to this project can find some use in it. It's quick-and-nasty code, but seems to generally work.

http://www.jonstelly.com/files/development/Linq.Utilities.zip for the source code.

An example of an expression tree converted to XML:


Bobby Diaz
03/22/2007 06:08 AM by
Bobby Diaz


This looks good! I was actually thinking of writing something similar to enumerate the tree in code looking for certain information. I will definately put this to some use!


Bobby Diaz
03/26/2007 02:21 AM by
Bobby Diaz

Just wanted to let everyone know that I posted a link to an updated version of the source code on my new blog. Go check it out!

Blog post:


Source code:




Comments have been closed on this topic.