title: EF 6.0 Many to many relationship is not working in codefirst
body: <p>I have the following structure in database:</p>
  
  <p><img src="https://i.stack.imgur.com/p1SHr.png"></p>
  
  <p>For the above I have the following in my C# code for EF 6.0 CodeFirst.</p>
  
  <pre><code>[Table("Person")]
  public class User
  {
      [Key]
      [DatabaseGenerated(DatabaseGeneratedOption.None)]
      public long Id { get; set; }
  
      [Column("FullName")]
      [MaxLength(200)]
      public string Name { get; set; }
  
      public virtual ICollection&lt;Task&gt; Tasks { get; set; } = new HashSet&lt;Task&gt;();
  }
  
  
  
  [Table("Task")]
  public class Task
  {
      [Key]
      [DatabaseGenerated(DatabaseGeneratedOption.None)]
      public long Id { get; set; }
  
      [Column("FullName")]
      [MaxLength(200)]
      public string Title { get; set; }
  
      public virtual ICollection&lt;User&gt; Users { get; set; } = new HashSet&lt;User&gt;();
  }
  </code></pre>
  
  <p>The problem is that the collection is not getting populated at all and always returned as empty. for instance if I try:</p>
  
  <pre><code>userRepository.All.Include(x=&gt;x.Tasks).Where(x=&gt; x.FullName == "John").Select(x=&gt; x.Tasks.Title).ToList();
  </code></pre>
  
  <blockquote>
    <p>InnerException = {"Invalid object name 'dbo.PersonTask'."}</p>
  </blockquote>
  
  <p>What is the problem with my code?</p>