将efcore迁移到版本3.1时出错

时间:2020-02-12 13:46:32

标签: entity-framework asp.net-core

迁移到efcore3.1时出现错误

此行代码显示错误:

 entity.HasOne(d => d.ContentControl)
                    .WithMany(p => p.Content)
                    .HasForeignKey(d => d.ContentControlId)
                    .OnDelete(DeleteBehavior.ClientSetNull)
                    .HasConstraintName("FK_Content_ContentControl");

错误:

错误CS7069对类型'ReferenceOwnershipBuilder <,>'的引用声称它是在'Microsoft.EntityFrameworkCore'中定义的,但找不到它

我该如何解决?

0 个答案:

没有答案