In 3.9, I created a class that inherited from DataService, and I would override for example OnDataObjectedCreated Anytime a data object was created, my method was called. How do I do that in DO4? I created a class that inherits from SessionBound and implements ISessionService, and applied the ServiceAttribute on it. In its constructor I attached an event handler for the Session.EntityCreated event. However, my event handler is never called when entities are created. It gets returned if I use Session.Services.Get<t>, but this is not how I want to use it. I want it to be registered in the domain's services, and for the event handler to be registered when the domain is built. This thread was imported from our support forum. The original discussion may contain more detailed answer. |
You can do this by implementing IModule : see this sample http://blog.alexyakunin.com/2010/03/sim ... -some.html We are using this for similar purposes. I've created the following issue: http://code.google.com/p/dataobjectsdot ... ail?id=654 as further investigation is required. Thanks, olorin! Works =) olorin wrote: My pleasure :) |