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

Support Unicode Attribute #22514

Merged
merged 2 commits into from
Oct 27, 2020
Merged

Support Unicode Attribute #22514

merged 2 commits into from
Oct 27, 2020

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