From f21da548f8bfb3d2f238a883e38a6b09c39f98d1 Mon Sep 17 00:00:00 2001 From: Shay Rojansky Date: Wed, 14 Oct 2026 21:39:56 +0200 Subject: [PATCH] [10.0] Configure row value regression tuple mapping locally Avoid depending on global tuple mapping being enabled before the shared connection pool is initialized. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: cb362e50-f247-4ed7-b24c-6259a9870b3a --- .../Query/AdHocQueryFiltersQueryNpgsqlTest.cs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/test/EFCore.PG.FunctionalTests/Query/AdHocQueryFiltersQueryNpgsqlTest.cs b/test/EFCore.PG.FunctionalTests/Query/AdHocQueryFiltersQueryNpgsqlTest.cs index c17d4c5a6..dfb87cf05 100644 --- a/test/EFCore.PG.FunctionalTests/Query/AdHocQueryFiltersQueryNpgsqlTest.cs +++ b/test/EFCore.PG.FunctionalTests/Query/AdHocQueryFiltersQueryNpgsqlTest.cs @@ -9,10 +9,6 @@ protected override ITestStoreFactory TestStoreFactory [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 InitializeAsync( seed: async context => { @@ -33,7 +29,9 @@ public virtual async Task Row_value_projection_over_filtered_navigation(bool asy ] }); await context.SaveChangesAsync(); - }); + }, + onConfiguring: options => options.UseNpgsql( + NpgsqlTestStore.CreateConnectionString(StoreName), o => o.ConfigureDataSource(b => b.EnableRecordsAsTuples()))); await using var context = contextFactory.CreateContext();