Property relationships with Visual Studio 2010 Modeling Projects
I have a problem. I need to create a UML design, but specifying for relationships between classes which properties are the ones relating the classes. I want to creat开发者_运维技巧e a Visual Studio modeling project, but I can't seem to find how to associate specific properties of two classes in a class diagram. Is it possible?
Best regards, David
The way to do this is with associations. You don't add the attributes to the classes - instead, you draw an association between them. In UML, an association represents a pair of attributes. To give the attributes names, you set the role names on each end of the association. If you want to represent a pair of attributes, set IsNavigable=true on both roles.
Cheers Alan
精彩评论