diff --git a/src/MyTested.AspNetCore.Mvc.EntityFrameworkCore/ServiceCollectionEntityFrameworkCoreExtensions.cs b/src/MyTested.AspNetCore.Mvc.EntityFrameworkCore/ServiceCollectionEntityFrameworkCoreExtensions.cs index 446bc97a..8d4ec464 100644 --- a/src/MyTested.AspNetCore.Mvc.EntityFrameworkCore/ServiceCollectionEntityFrameworkCoreExtensions.cs +++ b/src/MyTested.AspNetCore.Mvc.EntityFrameworkCore/ServiceCollectionEntityFrameworkCoreExtensions.cs @@ -6,6 +6,7 @@ using Internal.EntityFrameworkCore; using Internal.Services; using Microsoft.EntityFrameworkCore; + using Microsoft.EntityFrameworkCore.Diagnostics; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection.Extensions; @@ -83,7 +84,9 @@ private static void AddScopedDatabase(opts => { - opts.UseInMemoryDatabase(Guid.NewGuid().ToString()); + opts + .UseInMemoryDatabase(Guid.NewGuid().ToString()) + .ConfigureWarnings(w => w.Ignore(InMemoryEventId.TransactionIgnoredWarning)); ((IDbContextOptionsBuilderInfrastructure)opts).AddOrUpdateExtension(new ScopedInMemoryOptionsExtension()); });