title: How to suppress InMemoryEventId.TransactionIgnoredWarning when unit testing with in-memory database with transactions?
body: <p>I'm using an EF Core in-memory database and I'm trying to run a unit test on a method that uses transactions:</p>
  <pre class="lang-cs prettyprint-override"><code>using (var transaction = await _context.Database.BeginTransactionAsync())
  {
      _context.Update(item);
      result = await _context.SaveChangesAsync();
  
      // some other stuff
  
      transaction.Commit();
  }
  </code></pre>
  <p>However, I'm getting this error from the test runner:</p>
  <blockquote>
  <p>System.InvalidOperationException: Warning as error exception for
  warning 'InMemoryEventId.TransactionIgnoredWarning': Transactions are
  not supported by the in-memory store. See
  <a href="http://go.microsoft.com/fwlink/?LinkId=800142" rel="noreferrer">http://go.microsoft.com/fwlink/?LinkId=800142</a> To suppress this
  Exception use the DbContextOptionsBuilder.ConfigureWarnings API.
  ConfigureWarnings can be used when overriding the
  DbContext.OnConfiguring method or using AddDbContext on the
  application service provider.</p>
  </blockquote>
  <p>How do I suppress that error?</p>