EnumToStringConverter<TEnum> Class

Definition

Converts enum values to and from their string representation.

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

Type Parameters

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

Remarks

See EF Core value converters for more information and examples.

Constructors

EnumToStringConverter<TEnum>()

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

EnumToStringConverter<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

منتج الإصدارات
Entity Framework Core 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0