title: How to change type of id in Microsoft.AspNet.Identity.EntityFramework.IdentityUser
body: <p>(ASP.NET MVC 5, EF6, VS2013)</p>
  
  <p>I'm trying to figure out how to <strong>change the type of the "Id" field from string to int</strong> in the type:</p>
  
  <pre><code>Microsoft.AspNet.Identity.EntityFramework.IdentityUser
  </code></pre>
  
  <p>in order to have new user accounts be associated with an integer ID rather than a GUID. But it seems like this will be more complicated than simply adding a new Id property with type int in my derived user class. Take a look at this method signature:</p>
  
  <p>(from Assembly Microsoft.AspNet.Identity.Core.dll)</p>
  
  <pre><code>public class UserManager&lt;TUser&gt; : IDisposable where TUser : global::Microsoft.AspNet.Identity.IUser
    {
    ...
    public virtual Task&lt;IdentityResult&gt; AddLoginAsync(string userId, UserLoginInfo login);
    ...
    }
  </code></pre>
  
  <p>So it seems that there are other methods baked into the ASP.NET identity framework which require the userId to be a string. Would I need to reimplement these classes as well?</p>
  
  <p><strong>An explanation of why I don't want to store GUIDs for ids in the user table:</strong></p>
  
  <p>-There will be other tables that relate data to the users table via a foreign key. (When users save content on the site.) I see no reason to use the larger field type and spend extra database space with no clear advantages. (I know that there are other posts about using GUIDs vs int ids, but it seems like many suggest that int ids are faster and use less space, which still leaves me wondering.)</p>
  
  <p>-I plan to expose a restful endpoint to allow users to retrieve data about a particular user. I think:</p>
  
  <pre><code>/users/123/name
  </code></pre>
  
  <p>is cleaner than</p>
  
  <pre><code>/users/{af54c891-69ba-4ddf-8cb6-00d368e58d77}/name
  </code></pre>
  
  <p>Does anyone know why the ASP.NET team decided to implement IDs this way? Am I being short sighted in trying to change this to an int type? (Perhaps there are benefits I'm missing.)</p>
  
  <p>Thanks...</p>
  
  <p>-Ben</p>