views:

334

answers:

1

I'm still quite new to NHibernate and most of it I'm getting to grips with. One area that I'm really lacking a proper understanding of though is querying (at least when it comes to anything reasonably complex).

I learn best by example, but I feel that I haven't really been able to find all that many in depth querying examples on the web. There are there are quite a few of course - but there are many different techniques and approaches, and most of the examples seem to gloss over the details.

(For instance in the official nhibernate documentation, the ICriteria explanation comprises 4 sentences!)

Maybe I just haven't looked well enough? ;) Does anyone know of any good resources (on the web) with lots of query examples? (Both HQL and ICriteria prefferably).

+4  A: 

StackOverflow. I'm serious - go into Hibernate and NHibernate tags and search for Criteria and / or HQL. There are tons of questions / answers. I know because I wrote a lot of them :-)

NHibernate manual sections on HQL and Criteria have quite a few examples as well.

Finally, you can always post a question if you're having trouble with something. When / if you do, be aware that posting appropriate mappings / classes / tables makes it a lot easier to understand / answer any question related to Hibernate queries.

ChssPly76
Hah, yeah that might be my best bet :)
UpTheCreek