Ayende @ Rahien

Hi!
My name is Oren Eini
Founder of Hibernating Rhinos LTD and RavenDB.
You can reach me by phone or email:

ayende@ayende.com

+972 52-548-6969

, @ Q c

Posts: 6,128 | Comments: 45,548

filter by tags archive

Linq For NHibernateOrderring and Paging

time to read 1 min | 170 words

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

(from c in nwnd.Customers select c.CustomerID)
        .Skip(10).Take(10).ToList();

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.

More posts in "Linq For NHibernate" series:

  1. (14 Apr 2007) Functions
  2. (05 Apr 2007) More Implementation Details
  3. (20 Mar 2007) Orderring and Paging

Comments

Hit
Hit

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

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

Keep the good work and thanks.

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:

http://www.jonstelly.com/files/development/OrderByTest.xml

Bobby Diaz

Jon,

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

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:

http://blogs.magiconsoftware.com/blogs/bdiaz/archive/2007/03/25/linq-for-nhibernate.aspx

Source code:

http://blogs.magiconsoftware.com/download/NHibernate.Linq.zip

Thanks,

Bobby

Comment preview

Comments have been closed on this topic.

FUTURE POSTS

  1. The low level interview question - 3 hours from now
  2. The worker pattern - 3 days from now

There are posts all the way to May 30, 2016

RECENT SERIES

  1. The design of RavenDB 4.0 (14):
    26 May 2016 - The client side
  2. RavenDB 3.5 whirl wind tour (14):
    25 May 2016 - Got anything to declare, ya smuggler?
  3. Tasks for the new comer (2):
    15 Apr 2016 - Quartz.NET with RavenDB
  4. Code through the looking glass (5):
    18 Mar 2016 - And a linear search to rule them
  5. Find the bug (8):
    29 Feb 2016 - When you can't rely on your own identity
View all series

RECENT COMMENTS

Syndication

Main feed Feed Stats
Comments feed   Comments Feed Stats