-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Support Unicode Attribute #22514
Conversation
src/EFCore.Design/Scaffolding/Internal/CSharpEntityTypeGenerator.cs
Outdated
Show resolved
Hide resolved
test/EFCore.Design.Tests/Scaffolding/Internal/CSharpEntityTypeGeneratorTest.cs
Show resolved
Hide resolved
5cdae72
to
aba5a9c
Compare
src/EFCore.Design/Scaffolding/Internal/CSharpEntityTypeGenerator.cs
Outdated
Show resolved
Hide resolved
test/EFCore.Design.Tests/Scaffolding/Internal/CSharpEntityTypeGeneratorTest.cs
Show resolved
Hide resolved
src/EFCore.Design/Scaffolding/Internal/CSharpEntityTypeGenerator.cs
Outdated
Show resolved
Hide resolved
test/EFCore.Design.Tests/Scaffolding/Internal/CSharpEntityTypeGeneratorTest.cs
Outdated
Show resolved
Hide resolved
test/EFCore.Design.Tests/Scaffolding/Internal/CSharpEntityTypeGeneratorTest.cs
Outdated
Show resolved
Hide resolved
test/EFCore.Design.Tests/Scaffolding/Internal/CSharpEntityTypeGeneratorTest.cs
Outdated
Show resolved
Hide resolved
test/EFCore.Tests/Metadata/Conventions/PropertyAttributeConventionTest.cs
Outdated
Show resolved
Hide resolved
Add Unicode annotation and the capability of generating UnicodeAttribute when scaffolding.
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. |
test/EFCore.Design.Tests/Scaffolding/Internal/CSharpEntityTypeGeneratorTest.cs
Show resolved
Hide resolved
@RaymondHuy - Thank you for contribution. |
#19794 Support Unicode attribute