title: Is there a way to avoid foreach with EF Core query
body: <p>I need advice on 2 things and below were db models and code
  1.)Avoiding foreach loop with my entityframecore query
  2.)Getting an error when using await keyword before context :- error invoice model was not awaitable</p>
  <pre><code>Public abstract class Customer {
  Id  ,
  Name,
  Address , 
  Collection &lt;Invoice&gt; Invoices 
  }
  
  Public class Invoice 
  {
  Id,
  Date ,
  Customer Id ,
  Bill Amount
  }
  </code></pre>
  <p>I need customer names who’s bill amount  was 500 , 200, 400 ( billmounts will change with every request)</p>
  <pre><code>List&lt;string&gt; Customername = new List&lt;string&gt;;
  
  Foreach( var amount in bill amount) {
      Var result =  Context.Invoice
          .Include(Customer) 
          .where( i =&gt;i.billamount == amount) 
          .select ( customer.name); 
  
       Customername.Add(result) 
  }
  
  return Customername; 
  </code></pre>
  <p>PS:- Format was messing up after posting</p>