In our editable root classes we have some static code that allows UI components to register a delegate method that will be invoked when that editable root is saved. The purpose is to let forms displaying summary lists know when they should refresh themselves. (This is a winforms app by the way).
That seems to work well, and because the delegate list is static it seems to avoid issues with memory leaks and accidentally keeping business objects alive.
To trigger the delegates I have overridden BusinessBase.Save, but to do that I had to change the declaration from 'public T Save()' to 'public virtual T Save()' in the framework code.
In the happy new world of NuGet I'd like to avoid having changes to the CSLA framework, so is there something else I can override or handle that would give me the same functionality?
I also have a feeling Save may not be virtual for a good reason?
I assume that you are using CSLA 4.5 and the method to override is actually SaveAsync.
This method is called for both sync and async Save.
Perfect, thanks Jonny
Copyright (c) Marimer LLC