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

Add relational metadata extensions for conventions. #15667

Merged
merged 1 commit into from
May 10, 2019

Conversation

AndriySvyryd
Copy link
Member

Refactor relational metadata extensions to be directly defined on the metadata objects.
Move conflict resolution between store generated configuration to a convention. Explicit conflicting configuration will now result in an exception.

Part of #214

Note that the PR is smaller than the new query pipeline PR, so should be easier to review.

Copy link
Contributor

@ajcvickers ajcvickers left a comment

Choose a reason for hiding this comment

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

🐑 🇮🇹

src/EFCore/EFCore.csproj Outdated Show resolved Hide resolved

return this;
}

IConventionDbFunctionBuilder IConventionDbFunctionBuilder.HasName(string name, bool fromDataAnnotation)
Copy link
Contributor

Choose a reason for hiding this comment

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

Should these and other explicit implementations have API docs?

Copy link
Member Author

Choose a reason for hiding this comment

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

No, they cannot be accessed other than through the interface

Copy link
Contributor

Choose a reason for hiding this comment

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

Right, but what do the generated API docs look like?

Copy link
Contributor

Choose a reason for hiding this comment

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

/cc @bricelam @divega Since they may know.

Copy link
Member Author

Choose a reason for hiding this comment

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

I think these members just don't appear there

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

It looks like Roslyn doesn't catch missing docs here, but SA1600 might...

@@ -137,7 +137,7 @@ public static IConventionEntityType RootType([NotNull] this IConventionEntityTyp
}

/// <summary>
/// Gets the primary or alternate key that is defined on the given property. Returns null if no key is defined
/// Gets the primary or alternate key that is defined on the given property. Returns <c>null</c> if no key is defined
Copy link
Contributor

Choose a reason for hiding this comment

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

My understanding from @bricelam is to not use c or code elements for this kind of thing.

Copy link
Member Author

Choose a reason for hiding this comment

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

Why not?

Copy link
Member Author

Choose a reason for hiding this comment

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

But that's the point, these words are not in English, by making them standout the reader won't subconsciously treat them as part of the sentence.

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't feel strongly about it.

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't think it's important enough to fix in all existing comments

Copy link
Member

Choose a reason for hiding this comment

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

I suspect a lot of it would be taken care of by one search-replace, and I do agree with @AndriySvyryd that it helps readability (but no super strong feelings either).

Copy link
Contributor

@ajcvickers ajcvickers left a comment

Choose a reason for hiding this comment

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

Probably because it's less jarring to read.

Copy link
Contributor

@ajcvickers ajcvickers left a comment

Choose a reason for hiding this comment

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

:shipit:

@AndriySvyryd AndriySvyryd force-pushed the Issue214_Part5 branch 4 times, most recently from 679d021 to 70206fb Compare May 10, 2019 01:06
Refactor relational metadata extensions to be directly defined on the metadata objects.
Move conflict resolution between store generated configuration to a convention. Explicit conflicting configuration will now result in an exception.
Mark UseSqlServerIdentityColumn() as obsolete in favor of ForSqlServerUseIdentityColumn()

Part of #214
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.

5 participants