title: What is the approach to use user id's throughout my application?
body: <p>Related content is here: <a href="https://stackoverflow.com/questions/9675471/best-practice-to-maintain-a-user-id-mvc">Best practice to maintain a user id (MVC)</a></p>
  
  <p>The authentication service, provided through IdentityDbContext, is ideal for my web application. I am able to add fields I want each user to have and everything is packaged nicely (so I don't have to make big changes to authentication). Included in this package of goods is a ApplicationUser_Id that sits in the AspNetUsers. My question is should I be using the ApplicationUser_Id as my user id throughout the application, <strong>or</strong> should I populate a separate, non-Identity table to hold my user id?</p>
  
  <p>I would love if someone with a similar situation can explain their thought process of choosing one or the other (or a completely different usage!)</p>
  
  <hr>
  
  <p><strong>EDIT</strong></p>
  
  <p>As request, I need to transition from my WebForms application to MVC (for scalability reasons). Previously in my WebForms application, I had a database with many tables. A majority of these tables were joint tables in which I used userId as a foreign key. In my previous application, I stored user information in a table called <code>Users</code>, and subsequent data was stored in <code>UserHasMonitor</code>, <code>UserHasKeyboard</code>, <code>UserHasCPU</code>, etc. I also had tables as <code>Monitor</code>, <code>Keyboard</code> and <code>CPU</code>. </p>
  
  <p>My WebForms application was to keep record of users and the parts of a computer that they owned. Each entity, such as a monitor or keyboard, was saved in its own table. Tables were joined together with joint tables and the data was displayed by querying the joint tables. </p>
  
  <p>Since moving to MVC, I want to take advantage of the built in authentication that comes with the Identity provided by MVC. With this I get a unique userId and password hash and other fields that I find I will need. However, because this is a new ballgame, my question is how should I be using my user id now that it is within the Identity provider, rather than a custom <code>Users</code> table like I had before? </p>
  
  <p>I have it set up now, my MVC application, with 2 connection strings. One connection string handles all Identity tablework while my other connection string will hold my joint tables.</p>
  
  <p>So, to boil it down:</p>
  
  <ol>
  <li><p>How do I integrate a user id with an MVC application that also uses many joint tables? Separate connection strings? Two separate databases?</p></li>
  <li><p>Should I be using virtual to connect my tables together (within my models) now that I am using Identity tables; will this alter the way my joint tables look?</p></li>
  <li><p>Any code examples are always nice, I've looked around but haven't found a good-defined procedure to use, so that is why my question is here.</p></li>
  </ol>