Skip to content

Refactor to use annotation access pattern#716

Merged
austindrenski merged 2 commits intonpgsql:devfrom
austindrenski:refactor-annotation-patterns
Nov 24, 2018
Merged

Refactor to use annotation access pattern#716
austindrenski merged 2 commits intonpgsql:devfrom
austindrenski:refactor-annotation-patterns

Conversation

@austindrenski
Copy link
Copy Markdown
Contributor

I realized while working on #685 that PostgresExtension, PostgresEnum, and PostgresRange broke with (what seems like) the standard annotation access patterns used throughout EF Core.

@austindrenski austindrenski self-assigned this Nov 21, 2018
@austindrenski austindrenski force-pushed the refactor-annotation-patterns branch 2 times, most recently from e78127d to a9533ca Compare November 21, 2018 07:53
Comment thread src/EFCore.PG/Metadata/NpgsqlRelationalAnnotations.cs Outdated
Copy link
Copy Markdown
Member

@roji roji left a comment

Choose a reason for hiding this comment

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

The overall direction is good and makes the good more clean/idiomatic. But please see notes about where the annotations belong.

Comment thread src/EFCore.PG/Metadata/NpgsqlRelationalAnnotations.cs Outdated
Comment thread src/EFCore.PG/Metadata/INpgsqlRelationalAnnotations.cs Outdated
Comment thread src/EFCore.PG/Extensions/NpgsqlMetadataExtensions.cs Outdated
@austindrenski austindrenski force-pushed the refactor-annotation-patterns branch from b17fbfd to e290f96 Compare November 23, 2018 06:19
@austindrenski austindrenski force-pushed the refactor-annotation-patterns branch from e290f96 to cbfe6e9 Compare November 23, 2018 06:38
@austindrenski
Copy link
Copy Markdown
Contributor Author

@roji I took another pass at this with better naming and more specific extension methods (i.e. not on IAnnotatable).

I think it's a step in the right direction, but may still need some refinement.

Copy link
Copy Markdown
Member

@roji roji left a comment

Choose a reason for hiding this comment

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

It looks close to ready, see my comment about the interfaces.

For the record I don't think there's huge value in this - it does make for a slightly nicer interface to the annotation data, but lots of code is added to support this...

Comment thread src/EFCore.PG/Metadata/INpgsqlAlterDatabaseOperationAnnotations.cs Outdated
@austindrenski austindrenski force-pushed the refactor-annotation-patterns branch from e21fe78 to 1101084 Compare November 24, 2018 16:28
@austindrenski austindrenski merged commit b56c93b into npgsql:dev Nov 24, 2018
@austindrenski austindrenski deleted the refactor-annotation-patterns branch November 24, 2018 16:48
@roji roji added cleanup and removed refactor labels May 29, 2020
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.

3 participants