score:3
Accepted answer
Doesn't matter. IQueryable is just a query statement and Fetch(), FetchMany() is just a setting on the Nhibernate query which enlarge the query to return more data so that you don't perform lazy loading later on. The query is not sent to the database until you call ToList(), Single() etc. The linq query is then transformed into a sql query which will contain more joins and columns and THEN it is sent to the database server.
The following query will do a "similar" join when fetching the entity + children but here I map it into a anonymous object:
_session
.Query<Entity>()
.Where(x => x.IsSomething)
.Select(x => new { MyEntity = x, MyEntitiesChildren = x.Children });
Source: stackoverflow.com
Related Articles
- Best order to place the Fetch or FetchMany in nHibernate Linq statements
- Fetch vs FetchMany in NHibernate Linq provider
- Linq for NHibernate and fetch mode of eager loading
- Best practices for dealing with LINQ statements that result in empty sequences and the like?
- Best open source LINQ provider
- NHIbernate (3.1) - Linq group by then order by count issue
- NHibernate 3.x deletes child entities when combining LINQ paging, many-to-many, and subselect fetch
- NHibernate linq - Use lambda expression in place of formula attribute on mapping
- C# linq order by and other statements with foreach, is there a performance difference?
- LINQ Source Code Available
- Nhibernate linq fetch in subclass
- When creating dynamic linq sorting and searching order statements in Entity Framework
- Linq (or SQL): Get a search query and sort it order by best result
- creating Linq to sqlite dbml from DbLinq source code
- Why Fetch should be the last clause in Linq Nhibernate query
- NHibernate LINQ query performance, which code fragment is better?
- Linq to NHibernate generating 3,000+ SQL statements in one request!
- Code Rewite for tuple and if else statements by using LINQ
- How to assign multiple LINQ Include() statements to a variable for code re-use?
- How best to optimise this small bit of c# Linq code
- source code for LINQ 101 samples
- Will Linq query code in C# UWP project work slower or faster depending on order of its' parts?
- linq to xml query based on multiple statements in order to serve a previous / next button
- Using FetchMany and Select in Linq to NHibernate query
- c# Linq or code to extract groups from a single list of source data
- how to fetch data from database using linq query for relationship 1:N and N:N (between 3 entity) in asp.net mvc EF code first?
- Order by property of nested object with NHibernate Linq
- Best practice for NHibernate Linq Query
- Preserving order with LINQ
- Convert string[] to int[] in one line of code using LINQ
- Using Linq, how to GroupBy against objects in a list within the target object
- How can I modify this C# code so that Visual Studio recognizes that I'm not an idiot?
- Select all data for duplicate objects
- C# datatable linq receiving mode 3 this ushort variable "Mins"
- how does skip and take really work?
- Output string variable in left hand side of assignment using LINQ
- Map query expression from DTO to Entity Object
- In MVC modeling, how do I bind a property to another model?
- Determining free time between calendar entries
- Which is better checking of null types or using Any() in LINQ?
- How to convert GetFuncType using LINQBridge
- Can some one help me to write C# mongo Query equivalent to SQL
- Cannot convert List<model> to model
- Can I use LINQ to generate random numbers reliably in C#?
- why we need to use AsEnumerable() method?
- How does PredicateBuilder work
- Linq query to filter values from a list
- C# Anonymous type foreach loop, a better way?
- C#, LINQ Getting Child elements of a Specified Parent Element
- Linq fill data for nested List<T>