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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-04 14:16:37  来源:igfitidea点击:

Visual Studio Class Diagram not showing relationships

c#.netvisual-studio

提问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.enter image description here

它适合像我这样在 1 分钟内找不到菜单项的人。在此处输入图片说明

回答by Maria Ines Parnisari

In Visual Studio 2013: right click the class, click Add, and select the desired relationship.

在 Visual Studio 2013 中:右键单击该类,单击Add,然后选择所需的关系。

enter image description here

在此处输入图片说明

More information: http://msdn.microsoft.com/en-us/library/ff657806.aspx

更多信息: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下载文件,我就简单解释一下下面的步骤。

  1. Access the link. In this case it is http://modeling.codeplex.com/.
  2. Click "download archive" button to download the archive.
  3. Open the downloaded zip file. ex) modeling.zip File structure in the archive file
  4. Navigate to "releases" folder if you are after the binary not the source.
  5. Open the releaseList.json file to see the description and the actual name of each file. Detailed info for each file
  6. Find the one you want and get the folder Id, file Id and FileName from the releaseList.json.
  7. Navigate to the folder matching the folder Id. ex) 2
  8. Select the file matching the file Id and copy to some other place. Rename the file with FileName from the releaseList.json.
  9. You can go from there.
  1. 访问链接。在这种情况下,它是http://modeling.codeplex.com/
  2. 单击“下载档案”按钮下载档案。
  3. 打开下载的 zip 文件。ex)归档文件中的modeling.zip文件结构
  4. 如果您是二进制文件而不是源代码,请导航到“发布”文件夹。
  5. 打开 releaseList.json 文件以查看每个文件的描述和实际名称。每个文件的详细信息
  6. 找到你想要的,并从 releaseList.json 中获取文件夹 Id、文件 Id 和 FileName。
  7. 导航到与文件夹 ID 匹配的文件夹。例如)2
  8. 选择与文件 ID 匹配的文件并复制到其他地方。使用 releaseList.json 中的 FileName 重命名文件。
  9. 你可以从那里去。