title: Castle Windsor Register by Convention - how to register generic Repository based on Entity?
body: <p>This should be a general problem, i've searched but couldn't found any solution yet, if it is a dupe, please point me appropriate link.</p>
  
  <p>So,
  i have a generic repository to support several entites, for a moment i register it like bellow:</p>
  
  <pre><code>public class ExpensiveServiceInstaller : IWindsorInstaller
  {
      public void Install(IWindsorContainer container, IConfigurationStore store)
      {
          Register&lt;EntityA&gt;(container);
          Register&lt;EntityB&gt;(container);
          //etc etc 
          //when there is a new one should register it manually
      }
  
      void Register&lt;T&gt;(IWindsorContainer container) where T : Entity
      {
          container.Register(Component.For&lt;IRepository&lt;T&gt;&gt;()
              .ImplementedBy&lt;Repository&lt;T&gt;&gt;()
              .LifeStyle.Transient);
      }
  }
  </code></pre>
  
  <p>Note:<br/>
  Repository located on <code>Repositories</code> namespace<br/>
  Entities located on <code>Entities</code> namespace, including the <code>Entity</code> baseclass of all entities</p>
  
  <p>it is working fine, but i think it should be a better way, the more automatic way using registration by convention, so when i add a new entity on my project, windsor will automatically recognize it, and register repository for it. and one more question, how to ignore <code>Entity</code> (the base class) so it not registered on the container.</p>
  
  <p>regards</p>