views:

57

answers:

1

I have been trying to implement Nhibernate.Linq 1.0.0.4000 together with Nhibernate 2.1.2.4000. After what I've read that should be a straightforward process - just adding a reference to Nhibernate.Linq and then start querying with Session.Linq<>..

So.. In my repository I added a very simple query:

  var query = (from l in _session.Linq<User>()  select l);
  return query.ToList();

However I run into an error I just can't understand. The error message is:

{"Entry point was not found.":""}

at NHibernate.ISession.get_SessionFactory() at NHibernate.Linq.NHibernateQueryProvider.TranslateExpression(Expression expression) at NHibernate.Linq.NHibernateQueryProvider.Execute(Expression expression) at NHibernate.Linq.Query1.GetEnumerator() at System.Linq.SystemCore_EnumerableDebugView1.get_Items()

Initially I thought It could be related to me configuring and mapping with Fluentnhibernate, but after reverting to vanilla config and mapping, I still have the same problem.

Should I switch the above linq-query to the ICriteria equivalent, it works like a charm.

Has this happened to anyone else? Do you have a solution?

TIA //Marcus

+1  A: 

I believe you are using the wrong build of NHibernate.Linq.

This is the one you should download.

Diego Mijelshon
Oh - or maybe I should say 'Doh' =) Thanks - it worked like a charm!
Marcus Oldin