2
donuts
5y

It's now 3am and this issue has been keeping me up for inner an hour... In Entity Framework..

I have a 2 tables/classes in a relationship: Item has many Tags.

I'm trying to delete some Tags using context.allTags.RemoveRange({list of tag objects I want deleted}) but now for some reason it's trying to reinsert/duplicate all Items and thereby violating all uniqueness constraints.

Guess will post the source code TMR but this is like wtf?

Comments
  • 1
    Use the fluent API to change the on delete property to set null
Add Comment