title: How to correctly implement other entity's reference to Identity user?
body: <p>I'm using Identity which has his own context.</p>
  
  <pre><code>public class ApplicationUser : IdentityUser {
      // some custom fields
  }
  
  public class IdentityContext : IdentityDbContext&lt;ApplicationUser&gt; {
     //...
  }
  </code></pre>
  
  <p>Also I have some other entities like this</p>
  
  <pre><code>public class Comment{
     public int Id {get;set;}
     public string Message{get;set;}
     public DateTime Time{get;set;}
  }
  </code></pre>
  
  <p>which are used by my other context</p>
  
  <pre><code>public class MyContext :DbContext {
     public DbSet&lt;Comment&gt; Comments { get; set; }
     //... other DbSets
  }
  </code></pre>
  
  <p>Question. I want that my Comment entity had author property, so I'll have something like</p>
  
  <pre><code>public class Comment{
     public int Id {get;set;}
     public string Message{get;set;}
     public DateTime Time{get;set;}
     public virtual ApplicationUser Author {get;set;}
  }
  </code></pre>
  
  <p>but ApplicationUser is located in different context, though in the same DB. I bet this is impossible.</p>
  
  <p>How to correctly implement this? 
  Should I move DbSets from MyContext to IdentityContext, so I can freely use code like this</p>
  
  <pre><code>public virtual ApplicationUser Author {get;set;}
  </code></pre>
  
  <p>or should I leave it be in different context, but add something like</p>
  
  <pre><code>public string AuthorId {get;set}
  </code></pre>
  
  <p>and make some workarounds to get the author info from different context every time I need it? Or something else?</p>
  
  <p>Thanks</p>
  
  <hr>
  
  <p><strong>Edit</strong></p>
  
  <p>Ok, I ended up with something like this:</p>
  
  <pre><code>public class ApplicationUser : IdentityUser {
          public virtual UserProfile UserProfile { get; set; }
  }
  
  public class UserProfile {
          [Key, ForeignKey("ApplicationUser")]
          public string Id { get; set; }
          //... custom fields
          public virtual ApplicationUser ApplicationUser { get; set; }
  
  }
  
  public class IdentityContext : IdentityDbContext&lt;ApplicationUser&gt; {
          //...
          public DbSet&lt;UserProfile&gt; UserProfiles { get; set; }
   }
  </code></pre>
  
  <p>But how I should implement Comment's author reference? Like this? So it will not be linked via EF relationships and I'll just fill UserProfileId somewhere in code by myself?</p>
  
  <pre><code>public class Comment{
     public int Id {get;set;}
     public string UserProfileId{get;set;}
  }
  </code></pre>
  
  <p>Is this correct way to do?</p>