Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I reject all changes in a Linq to SQL's DataContext?

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?

like image 651
Thomas Jespersen Avatar asked Nov 03 '08 16:11

Thomas Jespersen


1 Answers

Why not discard the data context and simply replace it with a new instance?

like image 106
Haacked Avatar answered Sep 26 '22 03:09

Haacked



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!