title: How to register a generic interface using TinyIOC
body: <p>Suppose I have a generic interface and a generic implementation. How do I register all usages?  </p>
  
  <p>Specifically, I have the following (reduced for simplicity):  </p>
  
  <pre><code>public interface IRepository&lt;T&gt; where T : TableEntity
  {
      T GetById(string partitionKey, string rowKey);
      void Insert(T entity);
      void Update(T entity);
      void Update(string partitionKey, string rowKey, Action&lt;T&gt; updateAction);
      void Delete(T entity);
      IQueryable&lt;T&gt; Table { get; }
  }
  
  
  public class AzureRepository&lt;T&gt; : IRepository&lt;T&gt; where T : TableEntity
  {
      ...
  }
  </code></pre>
  
  <p>Do I need to register all implementations one by one, like so:</p>
  
  <pre><code>container.Register&lt;IRepository&lt;Entity1&gt;, AzureRepository&lt;Entity1&gt;&gt;();
  container.Register&lt;IRepository&lt;Entity2&gt;, AzureRepository&lt;Entity2&gt;&gt;();
  container.Register&lt;IRepository&lt;Entity3&gt;, AzureRepository&lt;Entity3&gt;&gt;();
  ...
  </code></pre>
  
  <p>Or is there a shorter way?</p>