title: EF Core querying data by related IDs
body: <p>Suppose I have two classes that have a many-to-one relationship</p>
  
  <pre class="lang-cs prettyprint-override"><code>public class ParentObject{
      public int Id { get; set; }
      public List&lt;ChildObject&gt; Children { get; set; }
      ...
  }
  
  public class ChildObject{
      public int Id { get; set; }
      public ParentObject Parent { get; set; }
  }
  </code></pre>
  
  <p>When I add the migration and update the database, the result is two tables:</p>
  
  <ul>
  <li>ParentObject
  
  <ul>
  <li>Id : int</li>
  <li>...</li>
  </ul></li>
  <li>ChildObject
  
  <ul>
  <li>Id : int</li>
  <li>ParentObjectId : int</li>
  <li>...</li>
  </ul></li>
  </ul>
  
  <p>Now I want to search for all of the children of a particular parent.  In SQL, I can do this without having to join in the parent table simply by querying on the <em>ChildObject.ParentObjectId</em> column.</p>
  
  <pre class="lang-sql prettyprint-override"><code>SELECT * FROM [ChildObject] c WHERE c.ParentObjectId = parentId
  </code></pre>
  
  <p>But in EF Core, the only way I've found to do this is to use <code>.Include(c =&gt; c.Parent)</code> and then <code>.FirstOrDefault(c =&gt; c.Parent.Id == parentId)</code>.  This creates a join to the <em>ParentObject</em> table.</p>
  
  <p>Is there a way to query the <em>ChildObject</em> table without the <code>.Include()</code>?</p>