title: Unity Container Resolve
body: <p>I just starting with Unity Container and my registration looks like this:</p>
  
  <pre><code>static void UnityRegister()
  {
        _container = new UnityContainer();
        _container.RegisterType&lt;IBook, Book&gt;();
        _container.RegisterType&lt;IBookRepository, BookRepository&gt;("Book");
        _container.RegisterType&lt;IBookService, BookService&gt;();
        _container.RegisterType&lt;IBookRepository, DatabaseRepository&gt;("Database");
  }
  </code></pre>
  
  <p>Now when I try to resolve doing this: </p>
  
  <pre><code>var service = _container.Resolve&lt;IBookService&gt;("Database");
  </code></pre>
  
  <p>I get error below: </p>
  
  <blockquote>
    <p>Resolution of the dependency failed, type = "UnityConsoleEx.IBookService",  name = "Database".
        Exception occurred while: while resolving.
        Exception is: InvalidOperationException - The current type,    UnityConsoleEx.IBookService, is an interface and cannot be constructed. Are you  missing a type mapping?</p>
  </blockquote>
  
  <pre><code>At the time of the exception, the container was:
  
  Resolving UnityConsoleEx.IBookService,Database
  </code></pre>
  
  <p>Can anyone point what I am doing wrong? </p>