Consider following LINQ-to-NHibernate queries:
var q1 = from se in query.ToList<SomeEntity>()
where
prop1 == "abc"
select se;
var q2 = from se in q1
where
m1(se.prop2) == "def"
select se;
q2
will not work with error: "The method m1 is not implemented". But when replace q2
with following query, everything goes ok:
var q2 = from se in q1.ToList<SomeEntity>()
where
m1(se.prop2) == "def"
select se;
Why this happens? How can I get first query to work too? Is this something that happens for LINQ-to-NHibernate only or happens in all LINQ queries?