title: Why is my response being serialized without navigation properties?
body: <p>Today I ran into a small problem with my code. I have an <code>HttpGet</code> method similar to the following:</p>
  
  <pre><code>[HttpGet]
  public IEnumerable&lt;SomeEntity&gt; Get()
  {
      return db.SomeEntity.ToList();
  }
  </code></pre>
  
  <p>where <code>SomeEntity</code> could be represented as</p>
  
  <pre><code>public class SomeEntity
  {
      #region DatabaseColumns
      [Key]
      public int SomeEntityID { get; set; }
      public string SomeEntityName { get; set; }
      #endregion
  
      #region Navigation Properties
      public virtual ICollection&lt;SomeChildEntity&gt; SomeChildEntity { get; set; }
      #endregion
  }
  </code></pre>
  
  <p>I noticed that <code>return db.SomeEntity.ToList();</code> only returned the top level members of the object (not the navigation properties). </p>
  
  <p>This made sense to me considering I was not calling <code>Include</code>. Out of curiosity, I attempted the following:</p>
  
  <pre><code>[HttpGet]
  public IEnumerable&lt;SomeEntity&gt; Get()
  {
      var enumeratedEntity = db.SomeEntity.ToList();
      return enumeratedEntity;
  }
  </code></pre>
  
  <p>To my surprise, it returned the entire entity along with its navigation properties.</p>
  
  <p>I also noticed that an <code>HttpGet</code> along these lines also returned the entire object</p>
  
  <pre><code>[HttpGet]
  public SomeEntity Get(int id)
  {
      return db.SomeEntity.Find(id);
  }
  </code></pre>
  
  <p>Can someone please explain, <em>or point me to resources that will explain</em>, why these methods return the entire object without using the <code>Includes</code> method while the first one doesn't?</p>