Mohamed, that is not part of the new Linq provider but is a "new" implementation of Criteria (it sit on top of Criteria but let you work in a more "natural" way).
2010/1/4 Mohamed Meligy <[email protected]> > This is unfortunately not in the new IQueryable (the one you can access > through ISession.Query<>() method). > > However, it is available in a new API that tries to sit in the middle > between the old criterion API and the shiny LINQ. It comes as part of the > new LINQ provider although it's not LINQ, and tries to simulate LINQ syntax. > Try instead of Query<>() to call the new other method > ISession.QueryOver<>(). > > Sample: > > var query = MySession.QueryOver<ParentEntityType>() > .Fetch(x => x.RelatedProperty).Eager > .Fetch(x => x.MyOtherProperty).Eager > .Where(x => x.Something == someValue) > .And(x => x.SomeOthercondition) > .OrderBy(orderCriteria).Asc; > > > You have nice LINQ-Like methods like Skip() and Take(), as well as a > List() method for returning multiple results and UniqueResult<>() for > returning single entity. > > > Regards, > > -- > Mohamed Meligy > Senior Developer, Team Lead Backup (.Net Technologies - TDG - Applications) > Injazat Data Systems > P.O. Box: 8230 Abu Dhabi, UAE. > > Phone: +971 2 6992700 > Direct: +971 2 4045385 > Mobile: +971 50 2623624, +971 55 2017 621 > > E-mail: [email protected] > Weblog: http://weblogs.asp.net/meligy > > > > On Mon, Jan 4, 2010 at 10:00 AM, Paul Batum <[email protected]> wrote: > >> The old linq provider had an Expand method that allowed you to specify >> eager loading, but I can't find the equivalent on the new provider. I >> have been able to compensate for this in some cases by specifying a >> join in the linq expression, but this won't work in all cases, such as >> when you want a collection eagerly loaded. Can someone clarify what >> the current state of affairs is regarding load options for the new >> provider and what the plans are? >> >> Thanks! >> >> Paul Batum >> >> -- >> >> You received this message because you are subscribed to the Google Groups >> "nhusers" group. >> To post to this group, send email to [email protected]. >> To unsubscribe from this group, send email to >> [email protected]<nhusers%[email protected]> >> . >> For more options, visit this group at >> http://groups.google.com/group/nhusers?hl=en. >> >> >> > -- > You received this message because you are subscribed to the Google Groups > "nhusers" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<nhusers%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/nhusers?hl=en. > -- Fabio Maulo -- You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/nhusers?hl=en.
