title: Entity Framework Many to many Web API Get
body: <p>I've been looking at a million pages and I feel like this should be trivial but I'm really struggling.</p>
  
  <p>I'm trying to create a .net Web API with Code first and I have 2 models: Events and Teams. Each event has many teams and each Team does many events.</p>
  
  <p>In my /api/GetEvents request I'm getting the event info fine, but the list of teams associated with that event is null</p>
  
  <pre><code>// GET: api/Events
      public IQueryable&lt;Event&gt; GetEvents()
      {
          return db.Events
      }
  </code></pre>
  
  <p>Event:</p>
  
  <pre><code>public class Event
  {
      public int EventId { get; set; }
      [Required]
      public string EventTitle { get; set; }
      [Required]
      public string EventLocation { get; set; }
      public string EventTicketPrice { get; set; }
      [Required]
      public DateTime EventDateTime { get; set; }
      [Required]
      public ICollection&lt;Team&gt; Teams{ get; set; }
  }
  </code></pre>
  
  <p>Team:</p>
  
  <pre><code>public class Team
  {
      [Key]
      public int TeamId { get; set; }
      [Required]
      public string TeamName { get; set; }
      public string Class { get; set; }
      public string TeamLocation { get; set; }
      public string TeamWebsite { get; set; }
  
      public ICollection&lt;Event&gt; Events { get; set; }
  }
  </code></pre>
  
  <p>I've checked the generated database and the intermediate table is there but its not connecting the many to many relationship. I've attempted querying to tie them together, but there isn't a DbSet to the intermediate table to join to tables.
  What am I missing?</p>