Nhibernate Linq Strange Issue
I开发者_Go百科 am experiencing a strange behavior using Nhibernate linq. I am querying for an entity based on a unique property in the class, although it is not technically the primary key. When I run the query with Nhibernate linq it returns the correct result, but the SQL generated has Select top 2 ... When I run the same query with icriteria there is no "top 2" included in the query. Is there anything obvious I should be looking at?
I think it's going to be rather difficult to assess the cause of this without any details. I would encourage you to step through the code and see why your lambda expression is being sql-ized the way it is.
精彩评论