I am testing my app and on one table purposly try to add an entry that already exists. This gives an error as it should.
Then I correct the problem and try to add it again.
It fails again saying I cannot add an entity with a key that already exists.
Some insight on StackOverflow led me to GetChangeSet which shows me that my second call to SubmitChanges after fixing the error, is still wanting to insert the original incorrect entry.
How do I reset it so that only my second entry is inserted?
Many thanks
Neill
I believe the proper way is to create a new DataContext, but you can delete entries from the changeset, see this article/blog for more info and some VB code