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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQL Server: introduce UseUtf8() sugar to configure UTF8 properties #27624

Open
roji opened this issue Mar 11, 2022 · 1 comment
Open

SQL Server: introduce UseUtf8() sugar to configure UTF8 properties #27624

roji opened this issue Mar 11, 2022 · 1 comment

Comments

@roji
Copy link
Member

roji commented Mar 11, 2022

#25798 added the ability to do HasColumnType("varchar(max)").IsUnicode(true), which configures a UTF8 property on SQL Server. We could also introduce a UseUtf8() sugar (or UseUTF8() 馃敟馃敟馃敟).

If we add it, you would be able to pass a non-UTF8 collation which is problematic. Or we'd validate the _UTF8 postfix, which would encode the SQL Server convention into EF Core - not ideal.

Note also that UseUtf8() would require the collation to be passed in, but that's only actually necessary if the user is using migrations.

@AndriySvyryd
Copy link
Member

Alternatively, we could allow UseCollation to just work by allowing type mappings to understand collations, related to #7172

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants