title: Configuration of Unity IoC with Web API 4.5
body: <p>I'm trying to configure Unity IoC in ASP.NET Web Api project. I have made installation of Unity.WebAPI package: </p>
  
  <blockquote>
    <p>PM > Install-Package Unity.MVC4</p>
  </blockquote>
  
  <p>And added the next code to <code>Initialise</code> method of <code>Bootstrapper</code> class:</p>
  
  <pre><code>DependencyResolver.SetResolver(new UnityDependencyResolver(container));
  </code></pre>
  
  <p>Also I have registered my repository in container:</p>
  
  <pre><code>container.RegisterType&lt;IProductRepository, ProductRepository&gt;();
  </code></pre>
  
  <p>But my App crashes with the error <code>Type 'MvcApplication1.Controllers.ValuesController' does not have a default constructor.</code>
  Could someone point me out what have I missed? I use .Net Framework 4.5. Which  package of Unity is OK for my purposes (Unity.WebAPI, Unity.MVC4, ...)? </p>
  
  <p><strong>Updated:</strong> Injection of repository into controller: </p>
  
  <pre><code>private readonly IProductRepository _repository;
  
  public ValuesController(IProductRepository repository)
  {
      _repository = repository;
  }
  </code></pre>