title: Entity Framework include only returning part of the database data
body: <p>I am very new to asp.net and C# so bear with me. I am trying to return data from a database using the entity framework .include() method so that I can get the foreign key information from another table. However, what is being returned is only part of the data. It seems to be cut off before everything is returned. </p>
  
  <pre><code>"[{"id":11,"name":"Mr. Not-so-Nice","heroType":3,"heroTypeNavigation":{"id":3,"type":"Villian","heroes":["
  </code></pre>
  
  <p>Which gives me the error: SyntaxError: Unexpected end of JSON input.</p>
  
  <p>Please seem below for the model classes and the GET section of the controller where this is being returned. If I remove the "include()" method it returns all the heroes from the main table just fine. </p>
  
  <pre><code>public partial class Hero
  {
      public int Id { get; set; }
      public string Name { get; set; }
      public int? HeroType { get; set; }
  
      public virtual HeroTypes HeroTypeNavigation { get; set; }
  }
  
  {
  public partial class HeroTypes
  {
      public HeroTypes()
      {
          Heroes = new HashSet&lt;Hero&gt;();
      }
  
      public int Id { get; set; }
      public string Type { get; set; }
  
      public virtual ICollection&lt;Hero&gt; Heroes { get; set; }
  }
  
  // GET: api/Heroes
      [HttpGet]
      public async Task&lt;ActionResult&lt;IEnumerable&lt;Hero&gt;&gt;&gt; GetHeroesTable()
      {
          return await _context.HeroesTable.Include(hero =&gt; hero.HeroTypeNavigation).ToListAsync();   
      }
  </code></pre>