Fluent foreign key using property name
Luigi6821 opened this issue · comments
Hi,
I briefly describe my problem.
I want to use fluent EF 6 API for configuring foreign key as described very well by the following link https://docs.microsoft.com/it-it/ef/ef6/modeling/code-first/fluent/relationships.
My needs are the following:
1- Have a generic method ModelBuilder.Entity without generic which return the EntityConfiguration class.
2- Use the class instantiated by 1 to create foreign key
Following example in the above link
modelBuilder.Entity(typeof(OfficeAssignment))
.HasRequired("Instructor")
.WithOptional();
Do you believe it could be part of a next patch release?
Thanks in advance.
Luigi
EF version: 6.4
Database Provider: any
Operating system: Windows 10
IDE: Visual Studio 2019
This issue has been closed because EF6 is no longer being actively developed. We are instead focusing on stability of the codebase, which means we will only make changes to address security issues. See the repo README for more information.