On Linq to SQL's DataContext I am able to call SubmitChanges() to submit all changes.
What I want is to somehow reject all changes in the datacontext and rollback all changes (preferable without going to the database).
Is this possible?
In .net 3.0 use the db.GetChangeSet().Updates.Clear()
for updated, db.GetChangeSet().Inserts.Clear()
for new or db.GetChangeSet().Deletes.Clear()
for deleted items.
In .net 3.5 and above the result of GetChangeSet() is now readonly, loop the collection in for or foreach and refresh every ChangeSet table like also macias wrote in his comment.