score:6
your problem might be a missing reference to microsoft.entityframeworkcore.relational?
this can be added through the package manager.
also ensure you are using .include from the microsoft.entityframeworkcore namespace and not the other .include (which does not have a .theninclude)
score:38
theninclude
is available only when you use the include
overload with lambda expression parameter:
query = query.include(e => e.car).theninclude(e => e.model);
when you use the include
overload with string argument, there is no need of theninclude
since you can specify the whole property path in the passed string:
query = query.include("car.model");
Source: stackoverflow.com
Related Query
- ThenInclude not recognized in EF Core query
- Could not find an implementation of the query pattern for source type 'System.Data.Entity.DbSet'
- The LINQ expression could not be translated. Either rewrite the query in a form that can be translated, or switch to client evaluation EF Core 3.1
- ThenInclude not working for an Entity Framework LINQ query
- EF Core using Let in query throw "Argument types do not match" exception
- linq - how do you do a query for items in one query source that are not in another one?
- Avoid extra loop and could not find implementation of query pattern for source type int Select not found
- Outer join with linq query in EF Core 3 not working
- Entity Framework Core 3.1.1 Where query could not be translated. Either rewrite the query in a form that can be translated,
- Query expressions over source type 'dynamic' or with a join sequence of type 'dynamic' are not allowed
- Could not find an implementation of the query pattern for source type
- Where clause in LINQ query is not recognized in vb.net?
- Linq not being recognized parse in query
- EF Core Loading Entities does not map to Query
- How can I check the number of calls to the database in LINQ query when using .NET Core and Code First?
- Could not find an implementation of the query pattern for source type 'System.Data.Entity.DbSet` 'Where' not found
- Getting "Could not find an implementation of the query pattern for source type 'ExcelQueryable<T>'. " Error
- EF Core 5.0 Union Linq Query with sub selects not working
- Entity Framework Core Linq query returning ids which do not exist in database
- Adding a second query inside the SELECT of a LINQ to Entities query gives Not Recognized Method error
- Could not find an implementation of the query pattern for source type 'Join'
- Entity Framework Core 3.1 - Linq - Could not be translated. Either rewrite the query in a form that can be translated
- Multiple levels with theninclude not returning all rows unless I query the detail
- LINQ Query not working properly ASP.NET CORE MVC
- Group method not recognized in LINQ query
- EF Core query with GroupBy and Count not working as expected
- dotnet core azure documentdb linq lambda query not running query on server
- query not translated by in Entity Framework, .net Core 3.1
- EF Core (LINQ) - The Query expression could not be Translated
- Query Source could not be identified
More Query from same tag
- Entity Framework query to custom object Class with List
- How can we return an empty collection using yield?
- Nested Linq query returns three times the result?
- Is null-checking on Linq queries idiomatic?
- Linq query with OrderBy word count
- Linq OrderByDescending, null first
- Convert string array to custom object list using linq
- How can I find files that are nested too deep?
- C# Ef Core Linq Query adding a calculated field to existing query results without using model
- linq2db find string in varchar field
- NullReferenceException in linq left join, how do I handle the null value?
- Clean Way to Merge Two Typed C# Objects Based on Given Sequence
- Distinct() not working, behaving differently in .NET 5 and 4.7.2
- How to select the least count of items in fluent nHibernate via a linq query?
- build dynamic linq query in where clause
- List<T> LINQ to JSON
- Select Elements in a String Array
- Converting a SQL join into LINQ with EF with filtering
- Find items not in datatable that are present in List<customclass>
- Selecting Distinct Values from a List
- Can code below be rewritten in LINQ/lambda
- VB LINQ: Order By doesn't work when used with Distinct
- Rule based Merging of list<A> elements into list<B> in C#
- Add Role to a User just as they Register
- EF6 Linq query for joining tables with view model
- SQL to Linq equivalent
- LINQ query not returning desired result as string. Why?
- LINQ to SQL Insert Sequential GUID
- Linq FirstOrDefault
- Use Include method to show specific fields in a jount table