title: Code First Entity Framework creates List<> property wrong
body: <p>So, I have a code first model which looks like this:</p>
  
  <pre><code>public class SeciovniContext : DbContext
  {
      public DbSet&lt;User&gt; Users { get; set; }
      public DbSet&lt;Permission&gt; Permissions { get; set; }
  }
  </code></pre>
  
  <hr>
  
  <pre><code>public class User
  {
      [Key]
      [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
      public int UserID { get; set; }
  
      [StringLength(30)]
      [Required]
      public string FirstName { get; set; }
  
      [StringLength(30)]
      [Required]
      public string LastName { get; set; }
  
      [StringLength(50)]
      [EmailAddress]
      [Required]
      public string Email { get; set; }
  
      public List&lt;Permission&gt; Permisions { get; set; }
  }
  </code></pre>
  
  <hr>
  
  <pre><code>public class Permission
  {
      [Key]
      // TODO: [Index(IsUnique = true)]
      public string PermissionType { get; set; }
  
      [Required]
      public string Description { get; set; }
  }
  </code></pre>
  
  <p>And, in my seed, I have this:</p>
  
  <pre><code>var permissions = new List&lt;Permission&gt; {
      new Permission() { PermissionType = "Admin", Description = "Admin" },
      new Permission() { PermissionType = "Editor", Description = "Editor" }
  };
  
  context.Permissions.AddRange(permissions);
  context.SaveChanges();
  
  var user1 = new User()
  {
      Email = "David@hotmail.com",
      FirstName = "David",
      LastName = "Jones",
      Permisions = permissions,
  };
  
  var user2 = new User()
  {
      Email = "John@yahoo.com",
      FirstName = "John",
      LastName = "Doe",
      Permisions = permissions.Where(p =&gt; p.PermissionType == "Admin").ToList()
  };
  
  context.Users.Add(user1);
  context.Users.Add(user2);
  
  context.SaveChanges();
  </code></pre>
  
  <p>I would expect this to somehow link a single user with N permissions. And, thus that David would have permissions "Admin" and "Edit" whereas John would just have "Edit".</p>
  
  <p>However, when the database is made, it looks like this:</p>
  
  <pre><code>-----------------------------------------
  | User Table                            |
  -----------------------------------------
  | UserID | Email | FirstName | LastName |
  -----------------------------------------
  
  
  -----------------------------------------
  | Permissions Table                     |
  -----------------------------------------
  | PermissionType | Description | UserID |
  -----------------------------------------
  </code></pre>
  
  <p>Thus, David has the Admin permission (but no edit) and John has the edit. Aside form that, doing <code>db.Users.FirstOrDefault(/* query */).Permissions</code> is turning up empty as well.</p>
  
  <p>Since I'm expecting there to be a finite number of Permissions, I'm really expecting something more like the below, which has a "middle" table which links the two together. But I don't want to have to manually maintain that link table. Is there a way to do what I'm trying to do: have a finite number of permissions (that don't duplicate) with an infinite number of users?</p>
  
  <p>Here's more what I would expect if this database were created by hand:</p>
  
  <pre><code>-----------------------------------------
  | User Table                            |
  -----------------------------------------
  | UserID | Email | FirstName | LastName |
  -----------------------------------------
  
  
  --------------------------------
  | Permissions Table            |
  --------------------------------
  | PermissionType | Description |
  --------------------------------
  
  
  ---------------------------
  | UserPermissions Table   |
  ---------------------------
  | PermissionType | UserId |
  ---------------------------
  </code></pre>