StringToEnumConverter<TEnum> Class

Definition

Converts strings to and from enum values.

C#
public class StringToEnumConverter<TEnum> : Microsoft.EntityFrameworkCore.Storage.ValueConversion.Internal.StringEnumConverter<string,TEnum,TEnum> where TEnum : struct

Type Parameters

TEnum
Inheritance
Microsoft.EntityFrameworkCore.Storage.ValueConversion.Internal.StringEnumConverter<String,TEnum,TEnum>
StringToEnumConverter<TEnum>

Remarks

See EF Core value converters for more information and examples.

Constructors

StringToEnumConverter<TEnum>()

Creates a new instance of this converter. This converter does not preserve order.

StringToEnumConverter<TEnum>(ConverterMappingHints)

Creates a new instance of this converter. This converter does not preserve order.

Properties

DefaultInfo

A ValueConverterInfo for the default use of this converter.

Applies to

Product Versions
Entity Framework Core 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0