Support for non-generic MapEnum method#4629
Support for non-generic MapEnum method#4629BogdanYarotsky wants to merge 11 commits intonpgsql:mainfrom
Conversation
roji
left a comment
There was a problem hiding this comment.
Sorry it took me so long to review this - there's been lots of .NET/EF 7.0 stabilization work recently.
Overall LGTM - see comments below.
| /// Defaults to <see cref="NpgsqlSnakeCaseNameTranslator"/> | ||
| /// </param> | ||
| /// <typeparam name="TEnum">A CLR enum type to be mapped</typeparam> | ||
| /// <typeparam name="TEnum">The .NET enum type to be mapped</typeparam> |
There was a problem hiding this comment.
FYI we use the term "CLR" a lot in the docs; though I don't really mind switching to talking about ".NET" (we're already not 100% consistent).
There was a problem hiding this comment.
Hi, sorry for a long time without answering. I will resolve the commented pieces in the following days.
There was a problem hiding this comment.
@roji just to clarify - should I bring back the old "CLR" stuff for consistency or is it fine this way?
| return found; | ||
| } | ||
|
|
||
| public override bool UnmapEnum(Type clrType, string? pgName = null, INpgsqlNameTranslator? nameTranslator = null) |
There was a problem hiding this comment.
Take a look at how UnmapComposite is implemented - the generic version actually calls the non-generic version, let's do it the same way with enums.
|
Replaced by #4852 |
These changes resolve #3383 by adding the MapEnum method which accepts System.Type as a parameter.
Implementation is the same as for the non-generic MapComposite method.