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");

Related Query

More Query from same tag