title: ASP Identity table column change but mapping is not possible with new column name
body: <p>I have changed the asp Identity so that in database <code>Id</code> column of <code>AspNetIdentity</code> table be <code>UserId</code>:</p>
  
  <pre><code>modelBuilder.Entity&lt;ApplicationUser&gt;()
                          .Property(p =&gt; p.Id)
                          .HasColumnName("UserId");
  </code></pre>
  
  <p>And that works fine. Generated table have <code>UserId</code> instead <code>Id</code>.<br/>
  Now I have another table that should be mapped with <code>AspNetUsers</code> by <code>UserId</code>:<br/>
  When write it this way:<br/></p>
  
  <pre><code>public class JobApply
      {   ...
          public int UserId { get; set; }       
          public virtual ApplicationUser ApplicationUser { get; set; }
  </code></pre>
  
  <p>Table in database looks like:<br/>
  <img src="https://i.stack.imgur.com/cEVLU.png" alt="enter image description here"><br/>
  And if I write it like this:</p>
  
  <pre><code>public class JobApply
      {   ...
          public int ApplicationUserId { get; set; }
          public virtual ApplicationUser ApplicationUser { get; set; }
  </code></pre>
  
  <p>database looks like:<br/>
  <img src="https://i.stack.imgur.com/1ypJK.png" alt="enter image description here"><br/>
  <br/><br/>
  First option created <code>UserId</code> field but it is not <code>FK</code> instead of that new field is added as <code>FK</code>.<br/>
  How can I properly map this to have table <code>JobApply</code> with field <code>UserId</code> to be <code>FK</code> to <code>AspNetUsers</code>?
  <br/><br/>
  <strong>UPDATE</strong>
  <br/><br/>
  When I add this:</p>
  
  <pre><code>base.OnModelCreating(modelBuilder);
  
              modelBuilder.Entity&lt;ApplicationUser&gt;()
                          .Property(p =&gt; p.Id)
                          .HasColumnName("UserId");
  
              modelBuilder.Entity&lt;JobApply&gt;()
                      .HasRequired(e =&gt; e.ApplicationUser)
                      .WithMany()
                      .HasForeignKey(e =&gt; e.UserId);
  </code></pre>
  
  <p>Tables relation looks like this:<br/>
  <img src="https://i.stack.imgur.com/U6sc3.png" alt="enter image description here"><br/>
  This is both classes:</p>
  
  <pre><code>public class ApplicationUser : IdentityUser&lt;int, ApplicationUserLogin, ApplicationUserRole, ApplicationUserClaim&gt;
      {
          public string Email { get; set; }
          public string ConfirmationToken { get; set; }
          public bool IsConfirmed { get; set; }
          public string PasswordResetToken { get; set; }
  
          public int CityId { get; set; }
          public virtual City City { get; set; }
  
  
          public virtual ICollection&lt;JobApply&gt; JobApplies { get; set; }
      }
  
  public class JobApply
      {
          public int JobApplyId { get; set; }
          public int UserId { get; set; }
          public int JobId { get; set; }
          public int JobApplyStatusId { get; set; }
          public DateTime CreatedDate { get; set; }
  
          public virtual ApplicationUser ApplicationUser { get; set; }
          public virtual Job Job { get; set; }
          public virtual JobApplyStatus JobApplyStatus { get; set; }
  
      }
  </code></pre>