From b7bb5e7ab84a59957eb04918dea8d3bef1eb2db9 Mon Sep 17 00:00:00 2001 From: Bart Koelman Date: Thu, 2 Dec 2021 19:42:05 +0100 Subject: [PATCH] Removed workaround for https://github.com/dotnet/efcore/issues/21234 --- test/TestBuildingBlocks/IntegrationTestContext.cs | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/test/TestBuildingBlocks/IntegrationTestContext.cs b/test/TestBuildingBlocks/IntegrationTestContext.cs index 162c2b6754..223b5edd1d 100644 --- a/test/TestBuildingBlocks/IntegrationTestContext.cs +++ b/test/TestBuildingBlocks/IntegrationTestContext.cs @@ -83,14 +83,7 @@ private WebApplicationFactory CreateFactory() services.AddDbContext(options => { - options.UseNpgsql(dbConnectionString, builder => - // The next line suppresses Entity Framework Core Warning: - // "Compiling a query which loads related collections for more than one collection navigation - // either via 'Include' or through projection but no 'QuerySplittingBehavior' has been configured." - // We'd like to use `QuerySplittingBehavior.SplitQuery` because of improved performance, but unfortunately - // it makes Entity Framework Core 5 crash on queries that load related data in a projection without Include. - // This is fixed in Entity Framework Core 6, tracked at https://github.com/dotnet/efcore/issues/21234. - builder.UseQuerySplittingBehavior(QuerySplittingBehavior.SingleQuery)); + options.UseNpgsql(dbConnectionString, builder => builder.UseQuerySplittingBehavior(QuerySplittingBehavior.SplitQuery)); #if DEBUG options.EnableSensitiveDataLogging();