KEMBAR78
Support Unicode Attribute by RaymondHuy · Pull Request #22514 · dotnet/efcore · GitHub
Skip to content

Conversation

@RaymondHuy
Copy link
Contributor

#19794 Support Unicode attribute

HuyLuong and others added 2 commits October 26, 2020 18:52
Add Unicode annotation and the capability of generating UnicodeAttribute when scaffolding.
@smitpatel
Copy link
Contributor

Figured out randomization. Tests don't round trip, they just build the model locally and try to generate code for it. Hence the model generation cannot actually have value conversion specified since relational scaffolding model factory does not generate such model. Further in scaffolding the unicode is inferred based on candidate clr type of string for SqlServer hence it is not explicitly scaffolded on the property either. So ideally what we get in the model is null for IsUnicode. Added additional code to print when IsUnicode is set to true. (Unlikely that we will ever need it but who knows if there is some database which has unicode false as default inference.
When field is mapped as property, we discover attributes on them, and UnicodeAttribute also works fine on them.

@smitpatel smitpatel merged commit a302bac into dotnet:main Oct 27, 2020
@smitpatel
Copy link
Contributor

@RaymondHuy - Thank you for contribution.

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.

3 participants