Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is LINQ-to-NHibernate ready for production code?

Tags:

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.

like image 617
driis Avatar asked Feb 13 '10 18:02

driis


1 Answers

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.

like image 58
Mark Simpson Avatar answered Oct 03 '22 18:10

Mark Simpson