Hi Ramon, On Wed, May 18, 2011 at 12:17 PM, Ramon Smits <[email protected]> wrote: [cut] > == Inject dependancy to publish event == > class MyEntity > { > public IBus Bus { get; set; } > public void Reset() > { > Bus.Publish(new ResetMessage()); > } > } > [cut] > Does anybody have any experience with one of these solutions? I am > especially interested in if the second example (inject a dependancy during a > load/get from the database) is possible with NHiberate. I think it is > because it can use Castle Windsor but I do not know how I can pass the > container that contains the dependancies.
As far as I know (I'm a newbie but I'm dealing with a similar issue), you should use an interceptor to intercept the entity creation and inject the component. So my answer is a two-part one: 1. yes, it is possible 2. no, I don't know exactly *how* achive this stuff. Maybe someone else can give you a better advice. Ciao, Giulio -- -- You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/nhusers?hl=en.
