title: Add column to AspNetUsers table
body: <p><strong>Workstation setup:</strong></p>
  
  <ul>
  <li>Windows 8.1 Pro</li>
  <li>Visual Studio Pro 2013 v 12.0.40629.00 Update 5</li>
  <li>.Net v 4.6.01055</li>
  </ul>
  
  <p><strong>Background:</strong></p>
  
  <p>I created my project using Individual Account Authentication and then following a guide I found on Youtube I created an EDMX Data Model from an existing database. I did this to create authentication for my website. I then modified the Default Connection in the web.config file to point to my existing database. When I registered the first user account after modifying the Default Connection it auto-generated all the necessary AspNet tables in my existing database.</p>
  
  <p><strong>Issue:</strong></p>
  
  <p>I need to add a custom column to the AspNetUsers table. I followed Microsoft's guide, found <a href="https://blogs.msdn.microsoft.com/webdev/2013/10/16/customizing-profile-information-in-asp-net-identity-in-vs-2013-templates/" rel="noreferrer">here</a>, but when I get to the step about modifying the Models\IdentityModels.cs file I am unable to do so because the file is missing.</p>
  
  <p><strong>Attempted Resolution:</strong></p>
  
  <p>I've attempted to bypass this by simply adding the column into the SQL database myself and then editing my WebAPI code.</p>
  
  <p>First I edited the RegisterBindingModel class found in the AccountBindingModels.cs file. I added the PeopleID section.</p>
  
  <pre><code>public class RegisterBindingModel
  {
      [Required]
      [Display(Name = "User name")]
      public string UserName { get; set; }
  
      [Required]
      [Display(Name = "Email")]
      public string Email { get; set; }
  
      [Required]
      [Display(Name = "PeopleID")]
      public string PeopleID { get; set; }
  
      [Required]
      [StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)]
      [DataType(DataType.Password)]
      [Display(Name = "Password")]
      public string Password { get; set; }
  
      [DataType(DataType.Password)]
      [Display(Name = "Confirm password")]
      [Compare("Password", ErrorMessage = "The password and confirmation password do not match.")]
      public string ConfirmPassword { get; set; }
  }
  </code></pre>
  
  <p>Then I edited the Register class found in the AccountController.cs file. I added the line pertaining to PeopleID.</p>
  
  <pre><code>[AllowAnonymous]
      [Route("Register")]
      public async Task&lt;IHttpActionResult&gt; Register(RegisterBindingModel model)
      {
          if (!ModelState.IsValid)
          {
              return BadRequest(ModelState);
          }
  
          IdentityUser user = new IdentityUser
          {
              UserName = model.UserName,
              Email = model.Email,
              PeopleID = model.PeopleID,
          };
  
          IdentityResult result = await UserManager.CreateAsync(user, model.Password);
          IHttpActionResult errorResult = GetErrorResult(result);
  
          if (errorResult != null)
          {
              return errorResult;
          }
  
          return Ok();
      }
  </code></pre>
  
  <p>Now once I add the <code>PeopleID = model.PeopleID,</code> line I get an error message which states "Microsoft.AspNet.Identity.EntityFramework.IdentityUser' does not contain a definition for 'PeopleID'". When I go to the IdentityUser.cs file it is locked and will not allow me to edit it.</p>