From 7717c235f20f3bf4af70244ffbf783bbc44fe4c9 Mon Sep 17 00:00:00 2001 From: Shay Rojansky Date: Wed, 14 Oct 2026 21:40:45 +0200 Subject: [PATCH] Configure row value regression tuple mapping on its data source Keep record-to-tuple mapping local to the regression test so it does not depend on global mapper initialization order. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: d9e678d6-bbc7-403a-926d-dda2b087f5a7 --- .../Query/AdHocQueryFiltersQueryNpgsqlTest.cs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/test/EFCore.PG.FunctionalTests/Query/AdHocQueryFiltersQueryNpgsqlTest.cs b/test/EFCore.PG.FunctionalTests/Query/AdHocQueryFiltersQueryNpgsqlTest.cs index a01afb5cb..f8362fe17 100644 --- a/test/EFCore.PG.FunctionalTests/Query/AdHocQueryFiltersQueryNpgsqlTest.cs +++ b/test/EFCore.PG.FunctionalTests/Query/AdHocQueryFiltersQueryNpgsqlTest.cs @@ -36,10 +36,6 @@ GROUP BY d."GroupId" [ConditionalTheory, MemberData(nameof(IsAsyncData))] public virtual async Task Row_value_projection_over_filtered_navigation(bool async) { -#pragma warning disable CS0618 // Type or member is obsolete - NpgsqlConnection.GlobalTypeMapper.EnableRecordsAsTuples(); -#pragma warning restore CS0618 // Type or member is obsolete - var contextFactory = await InitializeNonSharedTest( seed: async context => { @@ -60,7 +56,10 @@ public virtual async Task Row_value_projection_over_filtered_navigation(bool asy ] }); await context.SaveChangesAsync(); - }); + }, + onConfiguring: options => options.UseNpgsql( + NpgsqlTestStore.CreateConnectionString(NonSharedStoreName), + o => o.ConfigureDataSource(b => b.EnableRecordsAsTuples()))); await using var context = contextFactory.CreateDbContext();