title: Why is the DbContext closing before I attempt this LINQ query in Entity Framework using FindAsync()?
body: <p>I'm on a team using an EF, Code-first approach with ODP.Net (Oracle).   We need to attempt to write updates to multiple rows in a table, and store any exceptions in a collection to be bubbled up to a handler (so writing doesn't halt because one record can't be written).  However, this code throws an exception saying</p>
  <blockquote>
  <p>System.InvalidOperationException: The operation cannot be completed because the DbContext has been disposed.</p>
  </blockquote>
  <p>I'm not sure why.  The same behavior occurs if the method is changed to be a synchronous method and uses <code>.Find()</code>.</p>
  <pre><code>InvModel _model;
  
      public InvoiceRepository(InvModel model)
      {
          _model = model;           
      }
  
      public void SetStatusesToSent(IEnumerable&lt;Invoice&gt; Invoices)
      {
  
  
          var exceptions = new List&lt;Exception&gt;();
          foreach (var id in invoices)
          {
              try
              {                    
                  var iDL = await _model.INVOICES.FindAsync(id);/*THROWS A DBCONTEXT EXCEPTION HERE*/
                  iDL.STATUS = Statuses.Sent; // get value from Statuses and assign                   
                  _model.SaveChanges(); //save changes to the model
              }
              catch (Exception ex)
              {
                  exceptions.Add(ex);
                  continue; //not necessary but makes the intent more legible
              }
          }
       }
  </code></pre>
  <p>Additional detail update:  <code>_model</code> is injected by DI.</p>