dotnet / dotnet/efcore

Replace EnumToNumberConverter with EnumToStringConverter for all enum types in ConfigureConventions

Open
#26,890 2 comments 1 reaction 0 assignees View on GitHub
area-model-building customer-reported
Dominant language
C#
Stars
14.8k
Forks
3.4k
PR merge metrics
PR metrics pending

Description

## Ask a question

Is there a way to globally change the enum converter with the new `ConfigureConventions` method ?

### Include your code

Is there a way to do something like that ?

```C#
protected override void ConfigureConventions(ModelConfigurationBuilder configurationBuilder)
{
configurationBuilder.Properties()
.AreUnicode(false)
.HaveMaxLength(32)
.HaveConversion();
}
```

EF Core version: 6.0

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.