简体   繁体   中英

Entity Framework 6 Fluent API Configuration with Database First approach

How can I do Fluent API style configuration in Entity Framework 6 using the Database First approach?

I am trying to set the name of a many to many middle table that doesn't follow the naming convention.

You cannot use fluent API with Database First because fluent API is code and thus part of a Code First approach. In the Database fist approach, you reverse-engineer the database Model from an EDMX file, representing the existing database model.

Please see the official Microsoft documentation for more details of how to implement database models using the Database First approach: https://learn.microsoft.com/en-us/ef/ef6/modeling/designer/workflows/database-first .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM