score:2
are you using ef6 or ef core? on ef core you can use theninclude to load deeper level entities. like (from ms docs):
using (var context = new bloggingcontext())
{
var blogs = context.blogs
.include(blog => blog.posts)
.theninclude(post => post.author)
.theninclude(author => author.photo)
.include(blog => blog.owner)
.theninclude(owner => owner.photo)
.tolist();
}
Source: stackoverflow.com
Related Query
- How to include a table multiple times in Linq query
- how to fetch multiple table data in a single linq query and bind it to a autocomplete search model
- How to Get data in repeater from multiple table using like linq query
- How to convert SQL multiple table query to Linq
- how to query multiple table using linq
- How to apply multiple orderby in linq query
- Linq query join one table row to another table multiple row
- How to reuse a linq expression for 'Where' when using multiple source tables
- How can I create a dynamic LINQ query in C# with possible multiple group by clauses?
- How to include one specific row from another table with LINQ to Entities
- How to use a LINQ query to include index in Select with F#
- linq - how do you do a query for items in one query source that are not in another one?
- How can I write the following code more elegantly using LINQ query syntax?
- How to dynamic add filters to a LINQ query against an Odata Source in C#
- LINQ query to include fields from one row of a child table
- How to get SQL query into LINQ form in C# code
- How do I simplify a LINQ query with multiple .Select() in order to return an IQueryable(int)
- Does Entity Framework query the database multiple times if I use different fields of the same Linq query at different times?
- How can I code a Linq query to do an upward Include?
- How to join two table from two different edmx using linq query
- Using LINQ with MVC, how can I include multiple parameters into a where clause?
- How to perform left join in linq having multiple table joins
- Linq Join Query - How to display new table in view MVC C#
- Linq query is triggered multiple times without any apparent reason
- How to filter LINQ query by table column and get count
- how to get all columns name from multiple table in a dataset by LINQ
- Multiple counts on single table in LINQ query
- How do you write a LINQ query that filters a sub table to a specific time period and sums the results of the sub table?
- How can I include multiple child tables with a LINQ query?
- How to include OrderBy in Linq Query
More Query from same tag
- SQL Server stored procedure and Linq-to-SQL
- LINQ to XML Newbie Question
- Removing an item from a list - C#
- How can select first 3 item of list<>
- LINQ Query for particular situation
- using group by in IEnumerable result
- sum a complex dictionary using linq
- C# import XML file character error
- Linq join query displayed in MVC view
- Better way of assigning the variable during LINQ Query
- Get specific column from a dapper result set
- how to query xml using linq or xpath
- Concatenating a LINQ query and LINQ sort statement
- How to calculate sum of amount for each 5 weeks before in linq?
- Linq throwing exception when Null is returned to a string - attribute on a class?
- Using First() with OrderBy and DynamicQuery in One-To-Many related tables
- how to show number of users by age group in chart control in Asp.net MVC
- find list of one item not in second list
- Passing a collection of item to search for in LINQ
- Collection-valued parameters with The Entity Framework?
- Get immediate less value
- LINQ over local variables
- Linq to SQL: execution order when calling SubmitChanges()
- LINQ for diffing sets
- C# Linq Join 2 tables on multiple columns and GROUP BY for count
- To ToList() or not to ToList()?
- Generic expression for where clause - "The LINQ expression node type 'Invoke' is not supported in LINQ to Entities."
- OrderBy when a parent-value maybe null
- How to search string not in char array using LinQ
- Entity Framework Core - This may indicate either a bug or a limitation in EF Core