title: Asp.Net 5 7.0.0-rc1-final Database First woes
body: <p>Have an up and running asp.net 5 beta 5 app.  </p>
  
  <p>Trying to migrate to 7.0.0-rc1-final.</p>
  
  <p>To create a simple test environment, I create a new ASP.NET Web Application:</p>
  
  <pre><code>VS2015
  Version 14.0.23107.0 D14REL
  Microsoft .NET Framework
  Version 4.6.00079
  </code></pre>
  
  <p>I run, register, and login.  All working fine.</p>
  
  <p>Then to test database first principles:</p>
  
  <p>Using a copy of the db in use for the beta 5 app, I run:</p>
  
  <blockquote>
    <p>dnx ef dbcontext scaffold -c "ApplicationDbContext"  -o "Models"
    "Server=.\SS2014;Database=TSICV5;Trusted_Connection=True;"
    EntityFramework.MicrosoftSqlServer</p>
  </blockquote>
  
  <p>The Models folder fills in, app compiles fine.  </p>
  
  <p>Runs fine until login which fails on:</p>
  
  <pre><code>var result = await _signInManager.PasswordSignInAsync(model.Email, model.Password, model.RememberMe, lockoutOnFailure: false);
  </code></pre>
  
  <p>with:</p>
  
  <pre><code>ArgumentNullException: Value cannot be null.
  Parameter name: entityType
  Microsoft.Data.Entity.Utilities.Check.NotNull[T](T value, String parameterName) 
  </code></pre>
  
  <p>Have researched, but no luck.  I'm not well versed in EF7 migrations and could really use a nudge in the right direction.</p>
  
  <p>I'm concerned my Identity Tables in my db are different that what is being assumed (but careful inspection of the createidentitytables migration.cs show the essentials are correct, the only thing I see different is the naming of the keys and the absence of a few indexes)</p>
  
  <p>I'm also curious about the snapshotfile.cs and it's purposes and whether that is a lead.  That file seems to be creating "Identity" equivalents of "AspNet" tables in the database and I wonder if that is the issue.  Not sure where those classes are being stored (metadata?), and whether using db first removes their creation...</p>
  
  <p>Greatly appreciate any pointers or insights.</p>
  
  <p>Todd</p>