[英]After when I made add-migration and update-database problem occur
I have to add a new model to my project here is model 我必须在我的项目中添加一个新模型,这里是模型
public class Marking
{
[Key]
public int IdMakring{get;set;}
public int IdMema { get; set; }
[ForeignKey("Author")]
public string Authorr {get;set;}
}
in model memyContext I added 在我添加的模型memyContext中
public DbSet<Marking> Marking { get; set; }
I did add-migration and update-database 我做了add-migration和update-database
add-migration initialll -Context MemeGenerator.Data.ApplicationDbContext
add-migration initialll -Context memyContext
update-database -Context MemeGenerator.Data.ApplicationDbContext
when I made this, error show: 当我这样做时,错误显示:
I tried ones more update-database but it didn't help. 我尝试了更多更新数据库,但它没有帮助。 Somebody see how can I fix this?
有人看到我该如何解决这个问题?
try to execute specifying migration name 尝试执行指定迁移名称
example : 例如:
dotnet ef database update 20190524150901_initialll
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.