Skip to content

Compare actual element type annotations in ModelAsserter - #39576

Merged
cincuranet merged 1 commit into
dotnet:mainfrom
unsafePtr:fix/model-asserter-element-annotations
Nov 10, 2026
Merged

cincuranet merged 1 commit into
dotnet:mainfrom
unsafePtr:fix/model-asserter-element-annotations

Conversation

@unsafePtr

Copy link
Copy Markdown
Contributor
  • I've read the guidelines for contributing and seen the walkthrough
  • I've posted a comment on an issue with a detailed description of how I am planning to contribute and got approval from a member of the team
  • The code builds and tests pass locally (also verified by our automated build checks)
  • Commit messages follow this format
  • Tests for the changes have been added (for bug fixes / features)
  • Code follows the same patterns and style as existing code in this repo

ModelAsserter passed the expected element type annotations as both sides of the element type comparison, so annotations on the actual element type were never checked. The fix is in the test helper itself; the compiled model tests for InMemory and Sqlite, the ModelBuilder tests in EFCore.Tests and RelationalModelTest pass with it.

Fixes #39575

@cincuranet
cincuranet merged commit 3e83777 into dotnet:main Nov 10, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ModelAsserter compares expected element type annotations with themselves

2 participants