Updating to Csla 7 - DataPortal.DataPortalInvoke #3787
-
I didn't see any questions about DataPortalInvoke, the static event that existing in prior to Csla 6 I guess. Is it just gone? Is there an alternate method to hook into for every data portal call? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
The new data portal is instanced, not static, and so there is no central way to do that sort of thing using events. At least not a safe way in terms of memory leaks. On the server side the interceptor concept provides a rich way to be part of the processing pipeline. On the client side, the best way to hook into all data portal calls is to create an use a custom proxy (subclass of whatever proxy you are otherwise using). |
Beta Was this translation helpful? Give feedback.
-
I suppose that creating a proxy subclass isn't terribly elegant. Perhaps we should consider a client-side interceptor model like we have on the server? Presumably this is primarily for logging? |
Beta Was this translation helpful? Give feedback.
The new data portal is instanced, not static, and so there is no central way to do that sort of thing using events. At least not a safe way in terms of memory leaks.
On the server side the interceptor concept provides a rich way to be part of the processing pipeline. On the client side, the best way to hook into all data portal calls is to create an use a custom proxy (subclass of whatever proxy you are otherwise using).