Skip to content

Move IRelationalModel extension methods to the interfaces#24205

Merged
AndriySvyryd merged 1 commit intomainfrom
Issue19213_6
Feb 23, 2021
Merged

Move IRelationalModel extension methods to the interfaces#24205
AndriySvyryd merged 1 commit intomainfrom
Issue19213_6

Conversation

@AndriySvyryd
Copy link
Copy Markdown
Member

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

Fixes #19213

@AndriySvyryd AndriySvyryd requested a review from a team February 20, 2021 02:03
if (model.SetModelDependencies(Dependencies.ModelDependencies))
if (model.ModelDependencies == null)
{
model.ModelDependencies = Dependencies.ModelDependencies;
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

[EntityFrameworkInternal]
public ModelRuntimeInitializerDependencies(
[NotNull] SingletonModelDependencies singletonModelDependencies,
[NotNull] RuntimeModelDependencies singletonModelDependencies,
Copy link
Copy Markdown
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
Copy Markdown
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