简体   繁体   English

Visual Studio Class 图未显示关系

[英]Visual Studio Class Diagram not showing relationships

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.当我在不使用字段的情况下定义我的 class 属性(使用 C# 3.0 启用)时,class 图没有显示我的一对一/多关系。 Inheritance is visible in the diagram though..不过 Inheritance 在图中可见..

Is there a way to fix this?有没有办法来解决这个问题?

When you right click on the field or property you can select show as association or show as collection association.当您右键单击字段或属性时,您可以 select 显示为关联或显示为集合关联。

It's for people like me who do not find where is the menu item in 1 minute.它适用于像我这样在 1 分钟内找不到菜单项的人。在此处输入图像描述

In Visual Studio 2013: right click the class, click Add , and select the desired relationship.在 Visual Studio 2013 中:右键单击 class,单击Add和 select 所需的关系。

在此处输入图像描述

More information: http://msdn.microsoft.com/en-us/library/ff657806.aspx更多信息: http://msdn.microsoft.com/en-us/library/ff657806.aspx

This combines with Visual Studio and does everything you want to do with Class diagrams.这与 Visual Studio 相结合,可以用 Class 图表完成您想做的所有事情。 http://modeling.codeplex.com/ http://modeling.codeplex.com/

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/ .在这种情况下,它是http://modeling.codeplex.com/
  2. Click "download archive" button to download the archive.单击“下载存档”按钮下载存档。
  3. Open the downloaded zip file.打开下载的 zip 文件。 ex) modeling.zip File structure in the archive file ex)modeling.zip归档文件中的文件结构
  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.打开 releaseList.json 文件,查看每个文件的描述和实际名称。 Detailed info for each file每个文件的详细信息
  6. Find the one you want and get the folder Id, file Id and FileName from the releaseList.json.找到你想要的并从 releaseList.json 中获取文件夹 Id、文件 Id 和 FileName。
  7. Navigate to the folder matching the folder Id.导航到与文件夹 ID 匹配的文件夹。 ex) 2例如)2
  8. Select the file matching the file Id and copy to some other place. Select 匹配文件 ID 的文件并复制到其他地方。 Rename the file with FileName from the releaseList.json.使用 releaseList.json 中的 FileName 重命名文件。
  9. You can go from there.你可以从那里 go。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM