【发布时间】:2021-09-03 06:26:50
【问题描述】:
我有课
public class Types
{
public int ID {get; set;}
public string name {get; set;}
}
首先使用代码,我使用 add-migration 和 update-database 创建了相同结构的表。
但是当我向它添加另一个属性时。
public string SystemName {get; set;}
然后迁移,然后脚本将整个数据库包含在 up() 函数中,即使我删除了所有以前的迁移文件,也使用 CREATE。
为什么?
【问题讨论】:
标签: c# entity-framework c#-4.0 dbcontext