title: Convention based Entity Framework Core returning the object associated with the foreign key when using Web API
body: <p>I'm using EF code first. By convention, I have added a foreign key and a reference to the foreign object (I believe this is needed). When I send a <code>Get</code> request to the API, it returns an <code>IEnumerable</code>. The problem is that each record returned also returns the complete object for the foreign key. </p>
  
  <p>I've tried Googling the answer and for questions here on SO. I tried commenting out the reference to the other object but that didn't work.</p>
  
  <pre><code>public class Bill
  {
      // other properties
  
      public Guid PersonId { get; set; }    // this is the foreign key
      public Person Person { get; set; }    // this is the reference to the foreign object
  }
  </code></pre>
  
  <p>This is what is returned when executing the Get request:</p>
  
  <pre><code>[
     {
      //other fields
      "personId": "c28e52b0-1e40-46c4-812b-a61be7a69d53",
      "person": {
          //the entire other person object is returned here
         }
      },
  ]
  </code></pre>
  
  <p>How do I solve this without establishing a DTO for every model?</p>
  
  <p>I'd like to hear if I'm using code first conventions improperly.</p>