dotnet / dotnet/efcore

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

Open
#27,624 1 comment 1 reaction 0 assignees View on GitHub
area-model-building area-sqlserver
Dominant language
C#
Stars
14.8k
Forks
3.4k
PR merge metrics
PR metrics pending

Description

#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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.