title: Adding custom columns to ASP.NET Identity
body: <p>Trying to grasp the big picture here. This is a Web Forms project using Identity + EF for user management. The default project contains <code>IdentityModels</code> file which suggests that I should add custom properties to <code>ApplicationUser</code> class and then use migrations to update my database. I did that and the database was generated/updated. So far so good.</p>
  
  <p>Now I add a new EDMX to my project and import all my DB tables into it. This obviously brings in Identity tables into the diagram as well, which is good because I'll be adding my business domain tables and linking them to Identity tables through the model and then use migrations to update my database. Here are the questions and problems I face:</p>
  
  <ol>
  <li>Am I using Code-First or Model-First, or a mix of both (Does such a mix work)?</li>
  <li>Do I have more than one model in my project, namely the default Models file and the one generated by EDMX? </li>
  <li>If I have two models, which of the model classes correspond to <code>AspnetUsers</code> table; the default <code>ApplicationUser</code> class or the <code>AspNetUser</code> class generated by the EDMX? I mean which of these classes will be used by migrations to update my table's structure?</li>
  <li>Adding new properties to my <code>ApplicationUser</code> class doesn't seem to have any effect when I run <code>Add-Migration</code> and <code>Update-database</code> commands. It generates empty <code>Up()</code> and <code>Down()</code> functions.</li>
  <li>Adding a new property to an EDMX entity and then trying to send it to the database through migrations throws error saying that the new property doesn't have a mapping column. Now that's obvious I know, but then how does Model-First approach send changes to the DB?</li>
  </ol>
  
  <p>I know these are more than one questions, but they are tightly related and anyone trying to get a start will most probably face all of them, so I've gathered them in one place for future readers.</p>