title: asp.net mvc - membership provider
body: <p>For my ASP.NET MVC app, I just find dealing with unique-identifiers harder, so I have added my own field to ASPNET_USERS table - UserIdInt (which is actually a bigint!) So most of user operations use userIdInt as reference.</p>
  
  <p>Anyway, I am debating between two approaches:</p>
  
  <p>1)When a user logs in, look up from the database and store the userIdInt in a session variable and any-time session variable slips away, re-look it up and put it back in session variable. (It's okay to use sessions in MVC app, right?)</p>
  
  <p>2)Any time an operation needs to be performed, simply pass userName to database and take care of UserIdInt at database side by doing joins and such on ASPNET_Users table any time an operation from user needs to be performed.</p>
  
  <p>I am heavily leaning towards 1)... but I want to make sure I am on right track.</p>
  
  <p>I asked this question on <strong>Serverfault</strong> first, but I was told to ask this question here. </p>