title: Disable EF Core Migration verification query
body: <p>I'm running an asp.net core 2.1.4 web application with entity framework core 2.1.4 using code first. The migration and seed are done on application startup.</p>
  
  <p>I've noticed a couple of EF queries checking for checking the migration history on every call:</p>
  
  <pre><code>Executed DbCommand (47ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] SELECT OBJECT_ID(N'[__EFMigrationsHistory]');
  
  Executed DbCommand (2ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] SELECT OBJECT_ID(N'[__EFMigrationsHistory]');
  
  Executed DbCommand (4ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] SELECT [MigrationId], [ProductVersion] FROM [__EFMigrationsHistory] ORDER BY [MigrationId];
  
  No migrations were applied. The database is already up to date.
  </code></pre>
  
  <p>I don't want to check the database on every call. So I changed the ServiceLifetime.Singleton. But still I see this verification queries on every call. </p>
  
  <pre class="lang-cs prettyprint-override"><code>services.AddDbContext&lt;ApplicationDbContext&gt;(options =&gt;
  {
      options.UseSqlServer(dbConnectionString,
          builder =&gt; builder.MigrationsAssembly(migrationsAssembly));
  }, ServiceLifetime.Singleton, ServiceLifetime.Singleton);
  </code></pre>
  
  <p>There is a similar question on EF6: <a href="https://stackoverflow.com/questions/31220344/how-to-disable-migration-verification-during-every-dbcontext-initialization">How to disable Migration Verification during every DbContext initialization</a></p>
  
  <p>The NullDatabaseInitializer doesn't exist in EF core. </p>
  
  <p>What is recommended to do? Is this normal behavior? </p>