Selectively Disabling Cascade Delete on Many-to-Many Link Table
问题 Is it possible to selectively remove the Cascade Delete option on an automatically-generated many-to-many link table in Entity Framework 5 Code First? Here's a simple example which needs it: public class Parent { public int Id { get; set; } public virtual IList<ChildA> As { get; set; } public virtual IList<ChildB> Bs { get; set; } } public class ChildA { public int Id { get; set; } [Required] public virtual Parent Parent { get; set; } public virtual IList<ChildB> ChildBJoins { get; set; } }