Skip to content

Fix read model DbContext auto-registration on iOS NativeAOT#2256

Merged
einari merged 1 commit into
mainfrom
fix/efcore-dbcontext-discovery-aot
May 27, 2026
Merged

Fix read model DbContext auto-registration on iOS NativeAOT#2256
einari merged 1 commit into
mainfrom
fix/efcore-dbcontext-discovery-aot

Conversation

@einari
Copy link
Copy Markdown
Contributor

@einari einari commented May 27, 2026

Fixed

Observed regression starts at v20.10.10, where AOT safeguards were reverted and this path remained dependent on Types.Types.Instance/DependencyContext discovery.

On iOS NativeAOT, DependencyContext can be unavailable, so FindMultiple<T>() may return no DbContext types and auto-registration silently skips contexts.

Switch discovery to scan the explicitly provided assemblies directly, which also avoids simple-name collisions when multiple DbContext types share the same class name in different namespaces.
@einari einari added the patch label May 27, 2026
@einari einari merged commit 873da39 into main May 27, 2026
50 checks passed
@einari einari deleted the fix/efcore-dbcontext-discovery-aot branch May 27, 2026 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant