views:

155

answers:

2

Simple question: Is LINQ-to-NHibernate stable and feature-complete enough to be used for production code ? What are the limitations ?

NOTE : I am aware that this is a duplicate of this question, but the last answer is over a year old, so the answers might or might not be relevant any longer.

+2  A: 

If you're asking whether it will be able to cover your entire project then I think there's still a bit to go before everything you want to do will be covered by L2NH (unless your app doesn't do any complex queries). However, the code that works, works. So you can certainly have some pieces that use Linq and fall back to HQL or ICriteria for the parts that arent yet supported.

statichippo
+3  A: 

I recently switched a Linq To Sql implementation over to use NHibernate & NHibernate.Linq. Since I was using repository interfaces, it should've been a straight switch. However, it blew up in a couple of places. Firstly, any time I called IQueryable.Count(), it threw an exception. Secondly, there was a linq query that used grouping & ordering and that didn't work, either. I've not used it a lot, so there's always the chance I was doing something wrong, but those things worked fine with Linq To Sql.

Basically, your mileage may vary. For the most part it works well enough, but it may be a good idea to write some test applications to see whether it will meet your needs.

If you do decide to use it, write some integration tests to ensure the queries are functioning correctly.

Mark Simpson