ThenInclude Method not found
See original GitHub issueThe issue
After upgrade to 1.1.0. Run Query to load navigation property then got the error as below.
Code
var all = db.Category.Include(c => c.CategoryPics).ThenInclude(p => p.Picture);
var result = all.ToList();
Error
MissingMethodException: Method not found: 'Microsoft.EntityFrameworkCore.Query.IIncludableQueryable`2<!!0,!!2>
Microsoft.EntityFrameworkCore.EntityFrameworkQueryableExtensions.ThenInclude(Microsoft.EntityFrameworkCore.Query.IIncludableQueryable`2<!!0,System.Collections.Generic.ICollection`1<!!1>>, System.Linq.Expressions.Expression`1<System.Func`2<!!1,!!2>>)'.
Further technical details
EF Core version: 1.1.0 Operating system: Visual Studio version: VS 2015 Update 3
Other details about my project setup:
Issue Analytics
- State:
- Created 7 years ago
- Comments:13 (7 by maintainers)
Top Results From Across the Web
ThenInclude not recognized in EF Core query
ThenInclude is available only when you use the Include overload with lambda expression parameter: query = query.Include(e => e.Car).
Read more >EF core 6 then Include issue - Microsoft Q&A
In EF core 3.1 I am able to include a collection of object using include statement. After that then include is not working...
Read more >ThenInclude Method not found · Issue #7116 · dotnet/efcore
The issue After upgrade to 1.1.0. Run Query to load navigation property then got the error as below. Code var all = db.Category....
Read more >No way to .ThenInclude() multiple sub-properties #4716
AndInclude() method, which can be tacked onto a call to .ThenInclude() to ... The details objects are missing in the query and not...
Read more >ThenInclude in EF Classic
The ThenInclude method moves the chaining level to the property included. It allows us to include related objects from the next level. ThenInclude...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Re-opening to discuss in triage. This is a known binary breaking change; we may consider fixing it in a patch release.
This is fixed and merged. Leaving the bug open for patch approval.