Skip to content

Detect conflicting default ordering across contexts#24

Merged
SimonCropp merged 1 commit intomainfrom
Detect-conflicting-default-ordering-across-contexts
Feb 10, 2026
Merged

Detect conflicting default ordering across contexts#24
SimonCropp merged 1 commit intomainfrom
Detect-conflicting-default-ordering-across-contexts

Conversation

@SimonCropp
Copy link
Owner

Add runtime validation to Configuration.Cache to detect and reject conflicting default ordering configurations for the same entity type across different DbContext types, throwing an InvalidOperationException when ClauseMetadataList differs. Add tests to cover the new behavior (MigrationTests.ConflictingOrderingAcrossContexts_Throws), introduce SharedEntity and supporting contexts, and add ThenBy/ThenByDesc test entities and contexts. Also adjust RequireOrderingTests to match the expected ordering and bump package version to 0.3.2 in Directory.Build.props.

Add runtime validation to Configuration.Cache to detect and reject conflicting default ordering configurations for the same entity type across different DbContext types, throwing an InvalidOperationException when ClauseMetadataList differs. Add tests to cover the new behavior (MigrationTests.ConflictingOrderingAcrossContexts_Throws), introduce SharedEntity and supporting contexts, and add ThenBy/ThenByDesc test entities and contexts. Also adjust RequireOrderingTests to match the expected ordering and bump package version to 0.3.2 in Directory.Build.props.
@SimonCropp SimonCropp added this to the 0.3.2 milestone Feb 10, 2026
@SimonCropp SimonCropp merged commit 7fb6fd7 into main Feb 10, 2026
6 checks passed
@SimonCropp SimonCropp deleted the Detect-conflicting-default-ordering-across-contexts branch February 10, 2026 03:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant