Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move IRelationalModel extension methods to the interfaces #24205

Merged
merged 1 commit into from
Feb 23, 2021

Conversation

AndriySvyryd
Copy link
Member

Rename SingletonModelDependencies to RuntimeModelDependencies
Rename GetEntityTypes(Type) to FindEntityTypes(Type)
Rename FindPrincipals() to GetPrincipals()
Remove IModelCreationDependencies

Fixes #19213

{
model.ModelDependencies = Dependencies.ModelDependencies;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@roji Now I remember why the code was factored that way. I needed an atomic SetModelDependencies as this could be called from multiple threads and model initialization cannot be made reliably idempotent.

Suggestions?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed this to block concurrent threads until initialization is finished and also store the result in the model (needed for #8258).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, missed this mention... looks OK to me.

@@ -55,7 +55,7 @@ public sealed record ModelRuntimeInitializerDependencies
/// </summary>
[EntityFrameworkInternal]
public ModelRuntimeInitializerDependencies(
[NotNull] SingletonModelDependencies singletonModelDependencies,
[NotNull] RuntimeModelDependencies singletonModelDependencies,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

variable name. Also property name below?

Copy link
Contributor

@smitpatel smitpatel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

Rename SingletonModelDependencies to RuntimeModelDependencies
Rename GetEntityTypes(Type) to FindEntityTypes(Type)
Rename FindPrincipals() to GetPrincipals()
Remove IModelCreationDependencies

Fixes #19213
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.

Convert metadata extension methods to default interface implementations.
3 participants