diff --git a/src/JsonApiDotNetCore/Configuration/JsonApiOptions.cs b/src/JsonApiDotNetCore/Configuration/JsonApiOptions.cs
index 39a5e197f2..cfce02824f 100644
--- a/src/JsonApiDotNetCore/Configuration/JsonApiOptions.cs
+++ b/src/JsonApiDotNetCore/Configuration/JsonApiOptions.cs
@@ -22,10 +22,6 @@ public sealed class JsonApiOptions : IJsonApiOptions
///
JsonSerializerOptions IJsonApiOptions.SerializerWriteOptions => _lazySerializerWriteOptions.Value;
- // Workaround for https://github.com/dotnet/efcore/issues/21026
- internal bool DisableTopPagination { get; set; }
- internal bool DisableChildrenPagination { get; set; }
-
///
public string? Namespace { get; set; }
diff --git a/src/JsonApiDotNetCore/Queries/Internal/QueryLayerComposer.cs b/src/JsonApiDotNetCore/Queries/Internal/QueryLayerComposer.cs
index d1a55551de..6dbf8d633d 100644
--- a/src/JsonApiDotNetCore/Queries/Internal/QueryLayerComposer.cs
+++ b/src/JsonApiDotNetCore/Queries/Internal/QueryLayerComposer.cs
@@ -172,7 +172,7 @@ private QueryLayer ComposeTopLayer(IEnumerable constraints, R
{
Filter = GetFilter(expressionsInTopScope, resourceType),
Sort = GetSort(expressionsInTopScope, resourceType),
- Pagination = ((JsonApiOptions)_options).DisableTopPagination ? null : topPagination,
+ Pagination = topPagination,
Projection = GetProjectionForSparseAttributeSet(resourceType)
};
}
@@ -238,9 +238,7 @@ private IImmutableSet ProcessIncludeSet(IImmutableSet<
{
Filter = isToManyRelationship ? GetFilter(expressionsInCurrentScope, resourceType) : null,
Sort = isToManyRelationship ? GetSort(expressionsInCurrentScope, resourceType) : null,
- Pagination = isToManyRelationship
- ? ((JsonApiOptions)_options).DisableChildrenPagination ? null : GetPagination(expressionsInCurrentScope, resourceType)
- : null,
+ Pagination = isToManyRelationship ? GetPagination(expressionsInCurrentScope, resourceType) : null,
Projection = GetProjectionForSparseAttributeSet(resourceType)
};
diff --git a/test/JsonApiDotNetCoreTests/IntegrationTests/QueryStrings/Filtering/FilterDepthTests.cs b/test/JsonApiDotNetCoreTests/IntegrationTests/QueryStrings/Filtering/FilterDepthTests.cs
index b269739e38..1ca00b6149 100644
--- a/test/JsonApiDotNetCoreTests/IntegrationTests/QueryStrings/Filtering/FilterDepthTests.cs
+++ b/test/JsonApiDotNetCoreTests/IntegrationTests/QueryStrings/Filtering/FilterDepthTests.cs
@@ -27,9 +27,6 @@ public FilterDepthTests(IntegrationTestContext();
options.EnableLegacyFilterNotation = false;
-
- options.DisableTopPagination = false;
- options.DisableChildrenPagination = false;
}
[Fact]
@@ -370,11 +367,6 @@ await _testContext.RunOnDatabaseAsync(async dbContext =>
await dbContext.SaveChangesAsync();
});
- // Workaround for https://github.com/dotnet/efcore/issues/21026
- var options = (JsonApiOptions)_testContext.Factory.Services.GetRequiredService();
- options.DisableTopPagination = false;
- options.DisableChildrenPagination = true;
-
const string route = "/blogPosts?include=labels&filter[labels]=equals(name,'Hot')";
// Act
diff --git a/test/JsonApiDotNetCoreTests/IntegrationTests/QueryStrings/Pagination/PaginationWithTotalCountTests.cs b/test/JsonApiDotNetCoreTests/IntegrationTests/QueryStrings/Pagination/PaginationWithTotalCountTests.cs
index e2eb8a5ead..57f8823e8d 100644
--- a/test/JsonApiDotNetCoreTests/IntegrationTests/QueryStrings/Pagination/PaginationWithTotalCountTests.cs
+++ b/test/JsonApiDotNetCoreTests/IntegrationTests/QueryStrings/Pagination/PaginationWithTotalCountTests.cs
@@ -34,9 +34,6 @@ public PaginationWithTotalCountTests(IntegrationTestContext
await dbContext.SaveChangesAsync();
});
- // Workaround for https://github.com/dotnet/efcore/issues/21026
- var options = (JsonApiOptions)_testContext.Factory.Services.GetRequiredService();
- options.DisableTopPagination = true;
- options.DisableChildrenPagination = false;
-
const string route = "/blogPosts?include=labels&page[number]=labels:2&page[size]=labels:1";
// Act