title: How To Register Generic Repository With SimpleIOC
body: <p>How can I register generic Repository with SimpleIOC?</p>
  
  <pre><code>  public interface IRepository&lt;T&gt;
    {
  
    }
  
    public class Repository&lt;T&gt; : IRepository&lt;T&gt;
    {
  
    }
  
    SimpleIoc.Default.Register&lt;IRepository, Repository&gt;(); //Doesn't work, throws error
  
  
   Error  1   Using the generic type 'AdminApp.Repository.IRepository&lt;TModel&gt;' requires 1 type arguments  C:\Application Development\AdminApp\AdminApp.Desktop\ViewModel\ViewModelLocator.cs  55  44  AdminApp.Desktop
  </code></pre>
  
  <p>I Also tried:</p>
  
  <pre><code>    SimpleIoc.Default.Register&lt;IRepository&lt;&gt;, Repository&lt;&gt;&gt;(); //Doesn't work either
       Error  1   Only assignment, call, increment, decrement, await, and new object expressions can be used as a statement   C:\Application Development\AdminApp\AdminApp.Desktop\ViewModel\ViewModelLocator.cs  55  17  AdminApp.Desktop
  </code></pre>