开发者

Entity Framework 4.0 - Many to Many Relationship

开发者 https://www.devze.com 2023-01-08 17:09 出处:网络
I have probably stupid question but how Can I create Many-To-Many relationship with create option \"Model First\".

I have probably stupid question but how Can I create Many-To-Many relationship with create option "Model First".

I have read this article http://learnentityframework.com/LearnEntityFramework/tutorials/many-to-many-r开发者_StackOverflow中文版elationships-in-the-entity-data-model/ but here the autor haven't provided to much description and It is "Database First" option.

So is it possible to have two (not three) Entities in Model, chose many to many and Entity Framework will create association table automatically when "Create Database from Model" executed.

Regards, Daniel Skowroński


Drag association from the Toolbox in Model Designer and change the multiplicity of both ends to (*) in association properties.

0

精彩评论

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