How to override DataContext.SubmitChanges ()?

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

Whern I'm trying to override. I get a compiler error:

cannot override the inherited element 'System.Data.Linq.DataContext.SubmitChanges ()' because it is not marked as virtual, annotation, or overriding

Anyway, can I override this? Or do I need to create another method that runs my code and then runs the SubmitChanges () base?

thanks

+3
source share
1 answer

You cannot override parameterless overload , but you can override the one that takes the parameterConflictMode .

, , , , , .

+2

Source: https://habr.com/ru/post/1721692/


All Articles