EF taken out by navigation properties from the collection of tables, you can not delete the child table

From the master table is equipped with cascading deletes, if the property is removed when the navigation deleted from the fine error indicates that The relationship could not be changed because one or more of the foreign-key properties is non-nullable

 

Entity navigation property taken out of the collection from the table, EF can not tell you whether you want to carry out other operations, not cascading deletes, you must manually delete the record from the table

Guess you like

Origin www.cnblogs.com/Cyril-hcj/p/11697701.html