无法在实体框架中生成显式迁移 [英] Unable to generate an explicit migration in entity framework

查看:97
本文介绍了无法在实体框架中生成显式迁移的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在添加新的迁移,但是此消息显示:

I am adding a new migration but this message shows:


由于以下
是显式的,因此无法生成显式迁移迁移中:[201203170856167_left]。在尝试生成新的
显式迁移之前,先应用
等待显式迁移。

Unable to generate an explicit migration because the following explicit migrations are pending: [201203170856167_left]. Apply the pending explicit migrations before attempting to generate a new explicit migration.

有人可以帮我吗? ?

推荐答案

它告诉您应用程序中存在一些未处理的迁移,并且需要运行 Update-数据库,然后才能添加另一个迁移。

It tells you that there is some unprocessed migration in your application and it requires running Update-Database before you can add another migration.

这篇关于无法在实体框架中生成显式迁移的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆