title: Identity new table foreign key to AspNetUsers
body: <p>I am creating a new table (Let's call it Chart) under MVC Identity which consists of 2 columns (PatientId and DoctorId) that will refer back to the Id column of AspNetUsers. The new table will also have a PK of its own. The following is the <em>IdentityModels</em> class.</p>
  
  <pre><code>public class ApplicationUser : IdentityUser 
  {
    public virtual Chart Chart { get; set; }     
    ...
  }
  
  public class Chart 
  {
     [Key]
     public int Id { get; set; } 
  
     //How to FK the following two params?
     public string PatientId { get; set; }
     public string DoctorId { get; set; }
  
     public virtual ApplicationUser User { get; set; } // navigation property    
  }
  
  public class ApplicationDbContext : IdentityDbContext&lt;ApplicationUser&gt; 
  {
      public ApplicationDbContext()
            : base("DefaultConnection", throwIfV1Schema: false) {
  }
  
  public System.Data.Entity.DbSet&lt;Chart&gt; Chart { get; set; }
  
  public static ApplicationDbContext Create()
  {
     return new ApplicationDbContext();
  }
  </code></pre>
  
  <p>May I know how I can refer both my PatientId and DoctorId back to the Id column of AspNetUsers table? </p>
  
  <p>It will be a one-to-many relationship (One DoctorId can have many PatientId, but one PatientId can only be attached to one DoctorId).</p>