title: How to set up Unity container in MVC application
body: <p>I have troubles consuming unity container in ASP.NET MVC3 application.</p>
  
  <p>I have several project with interfaces and their implementation. All interface to concreete type binding is performed in the application startup method.</p>
  
  <p>I have several problems with this aproach: </p>
  
  <p>1) How to handle registration of types that are not dirrectly required by MVC application but by classes that it using (Repository uses ContextManager to retrieve context instance). If this class is located in assembly that is not used by mvc app, I will have to add reference to it.</p>
  
  <p>2) How to share configured container? Should I create separate assembly with static class wich will store created by mvc app container?</p>
  
  <p>3) What kind of unity container usage can possibly bring cross thread problems? How to register singletons so that they will be avaliable only in this thread (web server call) etc.</p>