When you begin to work with an ORM you encounter the concept of conversation, a conversation is the analogous of a transaction for database code, in a conversation I must be able to make a dialog to the ORM using the same context. In database there is no such concept, but I like it, and [...]

Continue reading about Manage conversation to a database

One of the capabilities of Windsor that I miss much from Spring is the ability to inject dependencies at runtime, let’s do an example. public class AlertManager {    private IMessageSender mSender;    public AlertManager(IMessageSender sender) {      mSender = sender;   }    public ILogger Logger {      get { return mLogger; }      set { mLogger = value; }   }   private ILogger mLogger = DevNullLogger.Instance;    public void Alert(String message) {      mSender.Send(“Alert received”, message);      if (mLogger.IsDebugEnabled)          mLogger.LogDebug(String.Format(“Alert send {0} message”, message));   }} <component    id=“MessageSenderMail”    service=“IoC.IMessageSender, IoC”    type=“IoC.MailSender, IoC”    lifestyle=“Transient“>    <parameters>       <mailAddress>[email protected]</mailAddress>    </parameters> </component> <component         id=“AlertManager“         service=“IoC.AlertManager, IoC“         type=“IoC.AlertManager, IoC“         lifestyle=“Transient“         inspectionBehavior=“all“>   <parameters>      <sender>${MailSender}</sender>      <Logger>${Log4NetLogger}</Logger>   </parameters></component> I declared that the AlertManager component needs a sender (and [...]

Continue reading about Castle Vs Spring Override delle properties