title: Identity ApplicationDbContext with ninject
body: <p>I am using ninject for my entities and have created a custom dbcontext, which holds my poco classes. This is <strong>CusDbContext</strong> . I then add *this to identity by adding it as a parameter in the base class constructor for <strong>ApplicationDbContext</strong></p>
  
  <pre><code>public class ApplicationDbContext : IdentityDbContext&lt;ApplicationUser&gt;
  {
      public ApplicationDbContext()
          : base("CusDbContext", throwIfV1Schema: false)
      {
      }
  </code></pre>
  
  <p>So now in my webconfig the connection string is set to CusDbContext. This all works fine. On the initial create <em>( when i register a user and .net creates the db in background with all the user tables )</em>
  <strong>This database is local by the way (local)\v11.0</strong> </p>
  
  <p>The tables are created and the user is added and all works fine. Then when i add migrations for code first it states </p>
  
  <blockquote>
    <p>More than one context type was found in the assembly</p>
  </blockquote>
  
  <p>Cool so i use my <strong>CusDbContext</strong>. </p>
  
  <pre><code>PM&gt;Enable-Migrations -ContextTypeName Library.Data.Concrete.CusDbContext
  PM&gt;Add-Migration init
  </code></pre>
  
  <p>And i get the error</p>
  
  <blockquote>
    <p>Library.Data.Concrete.IdentityUserLogin: : EntityType
    'IdentityUserLogin' has no key defined. Define the key for this
    EntityType.</p>
  </blockquote>
  
  <p>That is a viewModel though (O.o)</p>
  
  <p>Why is the migration trying to add a viewmodel as an entity? Is there any way to have one context type using identities default files? I still want to use ninject. </p>