我有这门课:
public class HabitDo{
public int? HabitId { get; set; }
virtual public Habit Habit { get; set; }
public int DoId { get; set; }
virtual public Do Do { get; set; }
public string Restriction { get; set; }
public int? ObjectiveId { get; set; }
public Objective Objective { get; set; }
public virtual ICollection<DoObjective> Objectives { get; set; }
}
Run Code Online (Sandbox Code Playgroud)
该表很好,但后来我从代码中删除了Objective属性:
public class HabitDo{
public int? HabitId { get; set; }
virtual public Habit Habit { …Run Code Online (Sandbox Code Playgroud) sql entity-framework entity-framework-4 ef-code-first ef-migrations