Validate Linq2Sql before SubmitChanges()

Posted by Nick Gotch on Stack Overflow See other posts from Stack Overflow or by Nick Gotch
Published on 2009-07-31T14:07:10Z Indexed on 2010/03/14 15:45 UTC
Read the original article Hit count: 417

Filed under:
|
|
|
|

Can anyone tell me if/how you can validate the changes in a data context in Linq2Sql before calling SubmitChanges(). The situation I have is that I create a context, perform multiple operations and add many inserts alongside other processing tasks and then rollback if the submit fails.

What I'd prefer to do is make some kind of "Validate()" call after certain tasks are done so that I can handle it before submitting the entire job.

© Stack Overflow or respective owner

Related posts about linq-to-sql

Related posts about c#