title: ef core return just the included entity
body: <p>in ef core I have a contract entity which has a paymentRequirement entity. I want to bring back just the payment requirement entity given the contract's id.</p>
  
  <pre><code>public async Task&lt;PaymentRequirement&gt; GetPaymentRequirementByContractAsync(long Id) =&gt;
              await context.Contracts.Include(p =&gt; p.PaymentRequirement).FirstOrDefaultAsync(p =&gt; p.Id == Id)?.PaymentRequirement
  </code></pre>
  
  <blockquote>
    <p>Severity  Code    Description Project File    Line    Suppression State
    Error CS1061  'Task' does not contain a definition for
    'PaymentRequirement' and no accessible extension method
    'PaymentRequirement' accepting a first argument of type
    'Task' could be found (are you missing a using directive or
    an assembly
    reference?)   Minerals    C:\Users\c-bdelling\source\repos\Minerals\Minerals\Repositories\PaymentRequirementRepository.cs 15  Active</p>
  </blockquote>
  
  <p>here is the contract</p>
  
  <pre><code> public class Contract : AuditedEntity
      {
          public long Id { get; set; }       
          public long? PaymentRequirementId { get; set; }
          public PaymentRequirement PaymentRequirement { get; set; }
  
      }
  </code></pre>
  
  <p>here is paymentrequirment</p>
  
  <pre><code> public class PaymentRequirement
      {
          public long Id { get; set; }
          public decimal? FloorPrice { get; set; }
      }
  </code></pre>