我可能发现了一个错误...至少它对我很烦,所以如果有人确认这一点我会很感激:
public int PriorityConfigurationSettingId { get; set; }
[ForeignKey("PriorityConfigurationSettingId")]
public virtual PriorityConfigurationSetting
PriorityConfigurationSetting{get;set; }
to
public int PriorityConfigurationSettingId { get; set; }
[ForeignKey("PriorityConfigurationSettingId")]
public virtual LookUp PriorityConfigurationSetting { get; set; }
当我将外键实体名称的名称从PriorityConfigurationSetting更改为LookUp时。完成模型更改后,我尝试通过EF Code Fist Migration获取脚本,我没有得到任何更改。