【问题标题】:Entity Framework classes to diagram [closed]图的实体框架类[关闭]
【发布时间】:2018-01-02 16:32:04
【问题描述】:

我有一堆具有导航属性和外键的类。如何可视化这些类之间的关系。

【问题讨论】:

  • 如果您使用 VS,它可以显示自动生成的 edmx 图。这不是一个 SO 可以为您解决的问题 - 它与 Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it. 接壤,此处明确引用为“离题”:stackoverflow.com/help/on-topic。我的建议是 Google/Wikipedia UML 并尝试 VS 功能。

标签: c# entity-framework entity diagram edmx


【解决方案1】:

如果您使用 Entity Framework 6,则可以使用“EF Power Tools”从您的 DbContext 创建 EDMX 图。

如果你使用VS,你可以使用“类图”

如果你使用 EF Core,你可以使用 EF Core Power Tools 来创建你的 DbContext 图表

【讨论】:

    【解决方案2】:

    简短的问题,简短的回答:您需要一个 DbContext,然后您可以使用 Entity Framework 电动工具,您可以找到 here

    右键单击包含派生 DbContext 类的文件时,可以使用以下上下文菜单功能:

    • 查看实体数据模型(只读)
    • 查看实体数据模型 XML
    • 查看实体数据模型 DDL SQL
    • 生成视图

    【讨论】:

      猜你喜欢
      • 2011-06-04
      • 2023-04-03
      • 2010-10-13
      • 2014-07-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2010-09-08
      • 2010-09-06
      相关资源
      最近更新 更多