chobo2
chobo2

Reputation: 85865

Tutorials on Nhibernate and linq to nhibernate

I am thinking of trying out Nhibernate and possibly the linq to Nhibernate extension.

Should I first go through just the regular Nhibernate first and then proceed to the linq extension?

Also does anyone have any good tutorials on linq to Nhibernate I am having trouble finding them.

Upvotes: 0

Views: 2218

Answers (3)

Rippo
Rippo

Reputation: 22424

Buy the book NHibernate 3.0 Cookbook, You can get just the PDF for about 16 quid, BARGIN!

Buy the book as it goes through how to set up a website using asp.net and asp.net MVC showing how to implement modules for session management. You will not be disappointed and for 16 quid you will save alot of time.

As a further note I have been usuing Nhibernate for just over a year and found it hard going looking at blogs, tutorials and sample apps etc. Because there is a lot of information regarding NHibernate on the web I found a lot of it is now outdated, you find a lot of contradictions and code that just does not work.

Upvotes: 0

moribvndvs
moribvndvs

Reputation: 42497

Linq-to-NHibernate wraps around NHibernate's Criterion API for creating queries. I think it's important to understand Nhibernate's essentials, and how the other optional query methods work. After that, it's mostly a matter of just understanding known issues and unimplemented parts of the L2N implementation.

Of course, you should look at NH3 if possible, as their LINQ support is much better and integrated into NH core. I think under the covers, L2N uses the QueryOver API added in NH3.

NHibernate Reference Documentation (for NH v3)

LINQ to NHibernate, JQuery/jqGrid SubGrid, HQL and ICriteria (for NH v2.1)

A nice beginning to end guide of getting NH and L2N up and running (for NH v2.1)

Upvotes: 1

Jay
Jay

Reputation: 57979

There is also Fluent NHibernate, which lets you create your mappings in code, rather than XML (HBM files).

I started out by reading the short and clear documentation from Fluent NHibernate.

There is also the Mastering NHibernate series at TekPub, which requires a purchase or subscription. It covers the basics and some intermediate material.

Finally, once you've created some tests/samples, try out the NhProf -- the NHibernate profiler. Though somewhat costly, it is truly an indispensible tool to working with NH -- for identifying bottlenecks, understanding how and when queries are executed, and improving performance in general.

Upvotes: 1

Related Questions