Assume I have two classes:
class Foo
{
List<Bar> someList
}
class Bar
{
string a;
}
I want to eager load a Foo instance from EF Core and include Foo.someList.a
When I try to straight up write an include such as
.Include("Foo.someList.a")
I get an exception:
An error was generated for warning 'Microsoft.EntityFrameworkCore.Query.InvalidIncludePathError':
Unable to find navigation 'Foo.someList.a' specified in string based include path 'a'.
This exception can be suppressed or logged by passing event ID 'CoreEventId.InvalidIncludePathError' to the 'ConfigureWarnings' method in
'DbContext.OnConfiguring' or 'AddDbContext'."} System.InvalidOperationException