title: How to resolve unity dependency in console app from constructor of new instance
body: <p><strong>Background:</strong></p>
  
  <p>I used Unity IoC only in WPF Application until now.<br>
  I would like to use is in a console application.<br>
  In the WPF Application runs some "magic" to automatically choose the correct constructor of the new object/instance.<br></p>
  
  <p><strong>Question:</strong><br></p>
  
  <p>How I use the same "magic" in my console application?<br></p>
  
  <pre><code>static void Main(string[] args)
  {
      IUnityContainer unitycontainer = new UnityContainer();
  
      // RegisterType of Dependency in container
      unitycontainer.RegisterType&lt;IMyDependency,Dependency&gt;(new ContainerControlledLifetimeManager());
  
      // How shall I choose the correct constructor?
      // In WPF Application the correct constructor was used automatically
      // How the wpf apps use the correct constructor with my dependencies?
      var newclass = new newclass();
  }
  
  public class NewClass
  {
       private readonly IMyDependency _dependency;
  
       public NewClass(IMyDependency dependency)
       {
           _dependency = dependency;
       }
  }
  </code></pre>