title: Mvc identity: Adding UserId to another table
body: <p>I have a Model called Sammanhang </p>
  
  <pre><code>[Key]
  public int SammanhangsID { get; set; }
  
  public string Namn { get; set; }
  </code></pre>
  
  <p>And I want to include the id of the users as a foreign key so that i can get a dropdown-list of all the users in the database.  </p>
  
  <p>I attepmted doing something like this </p>
  
  <pre><code>public class Sammanhang
  {
      [Key]
      public int SammanhangsID { get; set; }
  
      public string Namn { get; set; }
  
      public string UserId { get; set; }
      [ForeignKey("UserId")]
      public virtual ApplicationUser ApplicationUser { get; set; }
  }
  </code></pre>
  
  <p>and inside IdentityModels</p>
  
  <pre><code>public class ApplicationUser : IdentityUser
  {
      public virtual Sammanhang Sammanhang { get; set; }
  }
  </code></pre>
  
  <p>But without no success, Is there anyway to achieve a user dropdownlist?</p>