Skip to content

Commit d120a35

Browse files
author
Bart Koelman
committed
Removed workaround for dotnet/efcore#21234
1 parent e4eff9c commit d120a35

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

test/TestBuildingBlocks/IntegrationTestContext.cs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -83,14 +83,7 @@ private WebApplicationFactory<TStartup> CreateFactory()
8383

8484
services.AddDbContext<TDbContext>(options =>
8585
{
86-
options.UseNpgsql(dbConnectionString, builder =>
87-
// The next line suppresses Entity Framework Core Warning:
88-
// "Compiling a query which loads related collections for more than one collection navigation
89-
// either via 'Include' or through projection but no 'QuerySplittingBehavior' has been configured."
90-
// We'd like to use `QuerySplittingBehavior.SplitQuery` because of improved performance, but unfortunately
91-
// it makes Entity Framework Core 5 crash on queries that load related data in a projection without Include.
92-
// This is fixed in Entity Framework Core 6, tracked at https://github.com/dotnet/efcore/issues/21234.
93-
builder.UseQuerySplittingBehavior(QuerySplittingBehavior.SingleQuery));
86+
options.UseNpgsql(dbConnectionString, builder => builder.UseQuerySplittingBehavior(QuerySplittingBehavior.SplitQuery));
9487

9588
#if DEBUG
9689
options.EnableSensitiveDataLogging();

0 commit comments

Comments
 (0)