I would recommend adding the following partial methods before their actual action:
OnSave(CancelEventArgs e); OnAdd(CancelEventArgs e); OnUpdate(CancelEventArgs e); OnDelete(CancelEventArgs e);
This is not an event, but I would use CancelEventArgs in any case, it is friendly, people know it and know how to use it, and with it the actual action can be undone from partial methods.
These two should also be added to the list of existing ones that fire after their actual action:
OnAdded(); OnUpdated();
I do not like the name OnAdded (), but if Add was added instead of Insert, we must stick to it.
And what is it ... With these particles, I think that we cover all the prerequisites and the subsequent actual methods of data storage, providing us with great flexibility to do whatever we want, our data.
I can implement this, but I'm always afraid to touch the tt files, because future updates will erase all my user changes! :)
Thanks! Alex
source share