Visual Studio 2008 类设计器 - 多对多关联
在 Visual Studio 类设计器中是否有可视化多对多关联的技巧? 我有一个员工实体和一个团队实体。所以每个实体都有一个对应的列表。
关联可以在类设计器中显示,但仅限于 0..1 多重性。
或者有人有 VS 2010 和新架构类图的经验吗?我怀念的是生成的类 oO ...它们在哪里?!
Is there a trick for visualizing a many to many assocation in the Visual Studio Class Designer?
I have an Employee entity and a Team entity. So each entity has a list of his counterpart.
Associations are possible to show in the Class Designer, but only for 0..1 mulitplicity.
Or does anyone has experience with VS 2010 and the new architecture class diagram? What I miss there is the generated classes oO ... where they are?!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
你可以在 VS 2008 上做到这一点
我用 2 个类测试了它:
将这些类添加到图表中,展开它们以显示类成员,然后选择
“作为收藏协会展示”(两次)。然后显示带有 2 个箭头的图表
You can do it on VS 2008
I tested it with 2 classes:
Added these classes to the diagram, expanded them to show class members, and then selected
"Show as Collection Association" (twice). It then shows a diagram with 2 arrows
VS 2010 Ultimate 中的 UML 类图支持多对多关联。您需要在关联的First Role 和Second Role 属性上设置Multiplicity 属性。
有关详细信息,请参阅此主题:UML 类图中关联的属性
我在我的个人资料上发布了更多链接,以获取有关 VS 2010 的更多信息。
The UML class diagram in VS 2010 Ultimate supports many-to-many associations. You need to set the Multiplicity property on the First Role and Second Role properties of the association.
For more info, see this topic: Properties of Associations in UML Class Diagrams
I've posted more links on my profile for more info about VS 2010.