EF 4: Removing child object from collection does not delete it – why?

You aren’t deleting the object with the remove statement. Instead you are attempting to alter a record and make it an orphan (by setting the foreign key to null). The database has a non-null constraint on that column and prevents you from doing so.

Leave a Comment