title: Non-static method requires a target. Entity Framework 5 Code First
body: <p>I am getting the error "Non-static method requires a target." when I run the following query:</p>
  
  <pre><code>var allPartners = DbContext.User
                             .Include(u =&gt; u.Businesses)
                             .Where(u =&gt; u.Businesses.Any(x =&gt; x.Id == currentBusinessId))
                             .ToList();
  </code></pre>
  
  <p>My entites are defines like this:</p>
  
  <pre><code>public class User : Entity
  {
      public virtual List&lt;Business&gt; Businesses { get; set; }
  }
  
  public class Business : Entity
  {
      public virtual List&lt;User&gt; Users { get; set; }
  }
  
  public class Entity
  {
      [Key]
      [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
      public Guid Id { get; set; }
  }
  </code></pre>
  
  <p>And my context is configured like this;</p>
  
  <pre><code>public class Context : DbContext, IDatabaseSession
  {
      public DbSet&lt;Business&gt; Business { get; set; }
      public DbSet&lt;User&gt; User { get; set; }
  
      public Context()
          : base("DefaultConnection")
      {
  
      }
  
      protected override void OnModelCreating(DbModelBuilder modelBuilder)
      {
          base.OnModelCreating(modelBuilder);
  
          modelBuilder.Conventions.Remove
              &lt;System.Data.Entity.ModelConfiguration.Conventions.PluralizingTableNameConvention&gt;();
  
          Database.SetInitializer(new MigrateDatabaseToLatestVersion&lt;Context, Configuration&gt;());
  
          modelBuilder.Entity&lt;User&gt;()
              .HasMany(u =&gt; u.Businesses)
              .WithMany(b =&gt; b.Users);
      }
  }
  </code></pre>
  
  <p>What have I done wrong?</p>