Share via


EnumToStringConverter<TEnum> Class

Definition

Converts enum values to and from their string representation.

public class EnumToStringConverter<TEnum> : Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter<TEnum,string> where TEnum : struct
public class EnumToStringConverter<TEnum> : Microsoft.EntityFrameworkCore.Storage.ValueConversion.Internal.StringEnumConverter<TEnum,string,TEnum> where TEnum : struct
type EnumToStringConverter<'Enum (requires 'Enum : struct)> = class
    inherit ValueConverter<'Enum, string (requires 'Enum : struct)>
type EnumToStringConverter<'Enum (requires 'Enum : struct)> = class
    inherit StringEnumConverter<'Enum, string, 'Enum (requires 'Enum : struct and 'Enum : struct)>
Public Class EnumToStringConverter(Of TEnum)
Inherits ValueConverter(Of TEnum, String)
Public Class EnumToStringConverter(Of TEnum)
Inherits StringEnumConverter(Of TEnum, String, TEnum)

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