title: How to specify constructor value on resolved concrete type using Unity IoC?
body: <p>I've seen a lot of posts asking about <em>which</em> overloaded constructor to select using Unity, but my question is a little different and I can't figure out the answer. I have the following class inheriting an Interface (partial code):</p>
  
  <pre><code>public class UnitOfWork : IUnitOfWork
  {
      private DbContext _context;
  
      public UnitOfWork(DbContext context)
      {
          _context = context;
      }
  
  }
  </code></pre>
  
  <p>So now I'm trying to use unity to resolve the concrete type to the interface like below:</p>
  
  <pre><code>container.RegisterType&lt;IUnitOfWork, UnitOfWork&gt;();
  </code></pre>
  
  <p>However, I need to pass in my Entity Framework context to that concrete type upon being resolved. I <em>want</em> to do something like this:</p>
  
  <pre><code>container.RegisterType&lt;IUnitOfWork, UnitOfWork(new AdventureWorks2008R2Entities())&gt;();
  </code></pre>
  
  <p>Of course I know the code above is incorrect, and have read about using the <code>InjectionConstructor</code> class, but I don't think that's applicable here.</p>
  
  <p>So my question is, how do I define the value of that constructor on the <code>UnitOfWork</code> class when resolving the concrete type using Unity IoC?</p>
  
  <p>Thanks!</p>