Uh oh!
There was an error while loading. Please reload this page.
Add inference-based overload to ForNpgsqlHasEnum - #621
Conversation
- `PgNameAttribute` is respected for the type and members.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
austindrenski
commented
Aug 30, 2018
@YohDeadfall Updated per your review. |
austindrenski
commented
Sep 1, 2018
Updated to |
roji
left a comment
There was a problem hiding this comment.
Great idea.
Maybe update the doc enum samples to use this? After it's all it should the preferred method to define an enum assuming you have a CLR one...
One more point is to wait for #2139 to be merged and take a dependency on the appropriate 2.1.x nuget.
Scratch that....looks like it fixed itself? |
abc5b40 to
e655147Compareaustindrenski
commented
Sep 1, 2018
@roji I've updated the docs to just show the simplest overload. I'm now thinking about whether the old overloads should be obsoleted:
Thoughts? |
austindrenski
commented
Sep 1, 2018
Going to merge this now. If we decide to obsolete the preexisting overloads, I'll submit that as a separate PR. |
roji
commented
Sep 4, 2018
It's true that it's a little strange, but I'd rather continue to keep a clear separation between model definition (which determines what gets created in the database) and application usage. It's not totally implausible that someone may want to create a PostgreSQL enum type and use it from some external, non-EFCore application. I do agree that your new overload is definitely preferred for the vast majority of applications though (so it's good to have changed the docs in this way). |
austindrenski
commented
Sep 4, 2018
@roji Good point on the external use. |
Closes: #620
PgNameAttributeis respected for the type and members.NpgsqlConnection.GlobalTypeMapper.DefaultNameTranslatorRelated
#605