【问题标题】:Reverse engineer my models using EF Core Power tools issues使用 EF Core Power 工具对我的模型进行逆向工程
【发布时间】:2019-02-04 04:00:59
【问题描述】:

我正在创建一个应用程序并决定使用 EF 6。到目前为止,我只使用过 EF Core。我想先做数据库,然后使用 EF 6 电动工具。但是,当我下载并安装 EF 6 电源工具时,我在 Visual Studio 中看到一个显示 EF Core Power 工具的条目。这是为什么?我似乎无法从 NuGet 包管理器安装 EF 6 Powertools。我必须下载 VSIX 并安装它。

此外,当我使用 EF Core Power Tools 对我的模型进行逆向工程时,我收到以下错误:Entity red underline with error:

方法 e'Entity' 没有重载需要 1 个参数。

这是我流畅的 api 语法的问题吗?

modelBuilder.Entity<MyEntity>(entity =>
        {
            entity.HasKey(e => e.MyEntity_ID);

            entity.Property(e => e.FieldName)
                .IsRequired()
                .HasMaxLength(6);
        });

【问题讨论】:

    标签: c# entity-framework-6 ef-power-tools


    【解决方案1】:

    对于 EF6,请使用适用于 Visual Studio 2015 及更高版本的 EF 6 Power Tools Community Edition。

    “EF Core Power Tools”旨在用于 EF Core,而不是 EF6。

    【讨论】:

      猜你喜欢
      • 2018-12-22
      • 1970-01-01
      • 1970-01-01
      • 2018-04-20
      • 1970-01-01
      • 1970-01-01
      • 2011-02-20
      • 2011-08-13
      • 2011-05-26
      相关资源
      最近更新 更多