Giving the following code:
Animal a = new Animal { Name = "Rover", Type = "Dog" };
ctx.Animal.InsertOnSubmit(a);
Lets say the preceding code is in a method that gets called multiple times. I do not want to submit the same object twice. Would it be possible to query the DataContext
using GetChangeSet()
to see if this object already exists in the ChangeSet?
GetChangeSet().Insert
returns an IList<object>
I am drawing a blank as to how to find it.