主从表是配了级联删除的,如果通过导航属性去除从表明细删除时将报错the relationship could not be changed because one or more of the foreign-key properties is non-nullable

 

通过实体导航属性取出来的从表集合,ef无法判断你是否要对其进行别的操作,不会级联删除,必须手动删除从表记录