C# Visual Studio 类图未显示关系
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/708977/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Visual Studio Class Diagram not showing relationships
提问by kaivalya
When I define my class properties with out using fields (which was enabled with C# 3.0), class diagram is not showing my one to one/many relationships. Inheritance is visible in the diagram though..
当我在不使用字段的情况下定义我的类属性(在 C# 3.0 中启用)时,类图没有显示我的一对一/多关系。虽然继承在图中可见。
Is there a way to fix this?
有没有办法来解决这个问题?
采纳答案by REA_ANDREW
When you right click on the field or property you can select show as association or show as collection association.
当您右键单击字段或属性时,您可以选择显示为关联或显示为集合关联。
回答by CharithJ
This combines with Visual Studio and does everything you want to do with Class diagrams. http://modeling.codeplex.com/
这与 Visual Studio 相结合,可以使用类图完成您想做的所有事情。 http://modeling.codeplex.com/
回答by rockXrock
It's for people like me who do not find where is the menu item in 1 minute.
它适合像我这样在 1 分钟内找不到菜单项的人。
回答by Maria Ines Parnisari
In Visual Studio 2013: right click the class, click Add, and select the desired relationship.
在 Visual Studio 2013 中:右键单击该类,单击Add,然后选择所需的关系。
More information: http://msdn.microsoft.com/en-us/library/ff657806.aspx
回答by Cailleu
Since someone asked how to download files from old codeplex.com, I will briefly explain the steps below.
既然有人问怎么从旧的codeplex.com下载文件,我就简单解释一下下面的步骤。
- Access the link. In this case it is http://modeling.codeplex.com/.
- Click "download archive" button to download the archive.
- Open the downloaded zip file. ex) modeling.zip File structure in the archive file
- Navigate to "releases" folder if you are after the binary not the source.
- Open the releaseList.json file to see the description and the actual name of each file. Detailed info for each file
- Find the one you want and get the folder Id, file Id and FileName from the releaseList.json.
- Navigate to the folder matching the folder Id. ex) 2
- Select the file matching the file Id and copy to some other place. Rename the file with FileName from the releaseList.json.
- You can go from there.
- 访问链接。在这种情况下,它是http://modeling.codeplex.com/。
- 单击“下载档案”按钮下载档案。
- 打开下载的 zip 文件。ex)归档文件中的modeling.zip文件结构
- 如果您是二进制文件而不是源代码,请导航到“发布”文件夹。
- 打开 releaseList.json 文件以查看每个文件的描述和实际名称。每个文件的详细信息
- 找到你想要的,并从 releaseList.json 中获取文件夹 Id、文件 Id 和 FileName。
- 导航到与文件夹 ID 匹配的文件夹。例如)2
- 选择与文件 ID 匹配的文件并复制到其他地方。使用 releaseList.json 中的 FileName 重命名文件。
- 你可以从那里去。