I am trying to run the following LINQ query, with NHibernate 4.0.4.4000:
user = await Task.Run(() => Session.Query<TUser>().Where(u => u.Id.Equals(id)).FirstOrDefault()).WithCurrentCulture();
and I get the following error:
System.NotSupportedException: Boolean Equals(System.String)
I cannot use == because Id is TKey typical parameter of type TKey , and C # does not allow me to do this. I looked at it, and NHibernate said it was fixed in NH3.0.0GA . Surely, in 4.0.4 it would not be detached again? Maybe because I run it in Task ? Is there a workaround other than ToList and then use Equals ?
c # linq nhibernate
Profk
source share