首页 > 解决方案 > 无法解析符号“UseIdentityColumns”

问题描述

我有带有迁移的 .NET Core 3 项目(代码优先方法)

当我创建迁移时,我有ApplicationDbContextModelSnapshot文件

迁移已成功创建,但是当我进行此操作时dotnet ef database update出现此错误。

  ApplicationDbContextModelSnapshot.cs(18, 18): [CS1061] 'ModelBuilder' does not contain a definition for 'UseIdentityColumns' and no accessible extension method 'UseIdentityColumns' accepting a first argument of type 'ModelBuilder' could be found (are you missing a using directive or an assembly reference?)

我该如何解决这个问题?

标签: c#asp.netentity-frameworkasp.net-coreentity-framework-core

解决方案


推荐阅读