This repository has been archived by the owner on Jan 16, 2024. It is now read-only.
Use of newer functions, although explicitly older version 3.1 chosen, navigation properties #266
Projects
Milestone
I have created a model here, which refers to the 3.X version of the Entity Framework.
However, the generated code contains functions available only in higher versions, despite the choice of the 3.X version.
'EntityTypeBuilder<Xyz>' does not contain a definition for 'Navigation' and no accessible extension method 'Navigation' accepting a first argument of type 'EntityTypeBuilder<Xyz>' could be found (are you missing a using directive or an assembly reference?)
Here in the Entity Framework Core source code you can see that quite well. The "Navigation" function exists only in the newer versions, in version 3.X it was not present at this point.
Current version:
https://github.com/dotnet/efcore/blob/f54b9dcd189c91fc4b01b79c9387d23095819a8f/src/EFCore/Metadata/Builders/EntityTypeBuilder.cs#L230
Old version 3.1:
https://github.com/dotnet/efcore/blob/release/3.1/src/EFCore/Metadata/Builders/EntityTypeBuilder.cs
For this reason a compilation is not possible. The following packages are present in the .NET Framework 4.8 project:
Did I maybe forget something, or overlooked something? Unfortunately, so far I can't get the model for the old version 3.1 to work at all. This is really a pity.
The text was updated successfully, but these errors were encountered: