Relationships寫法EF和EFcore有點差異,發現有個網站有對照版本,以Many-to-Many為例:
EF版本(用Map)
https://www.entityframeworktutorial.net/code-first/configure-many-to-many-relationship-in-code-first.aspx
EFcore版本(用HasKey)
https://www.entityframeworktutorial.net/efcore/configure-many-to-many-relationship-in-ef-core.aspx
沒有留言:
張貼留言