tags:

views:

151

answers:

1

I want to override the SubmitChanges() method for my model.

Whern I try to override I get a compiler error:

cannot override inherited member 'System.Data.Linq.DataContext.SubmitChanges()' because it is not marked virtual, abstract, or override

Is there anyway I can override this? Or do I have to create another method that runs my code and then runs the base SubmitChanges()?

Thanks

+2  A: 

You can't override the parameterless overload, but you can override the one taking a ConflictMode parameter.

It's not documented that the first just calls the second with an appropriate conflict mode, but that's certainly what I'd expect.

Jon Skeet