开发者

Entity Framework naming conventions for many-to-many link tables

开发者 https://www.devze.com 2022-12-24 16:46 出处:网络
We are designing a SQL Server database with link tables for many-to-many开发者_如何学编程 relations.

We are designing a SQL Server database with link tables for many-to-many开发者_如何学编程 relations. The question is are there any best practices for naming these kinds of tables for use with the entity framework?

Let's say there's a table

Customer and Address

Then there is a link table between them, what do we call it? CustomerAddress ? Or something else?

Thnx


For example, users - UsersInRoles - Roles. If CustomerAddress does not contains anything except CustomerID and AddressID, EF'll generate only two entities Customer (with Addresses property) and Address (with Customers) and there is no any matter how you call this intermediate table

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号