If i do
Session.Linq<MyClass>().Where(x => x.Id = someId).FirstOrDefault();
where MyClass
has a set of eager loaded child object on it, the FirstOrDefault()
seems to prevent this from working by adding a TOP 1
to the SQL.
Is this just a bug (feature?) in Linq2NH (which i understand is being rewritten) or am I missing something?
Is there a preferred alternative which works properly?
Thanks