Class EnumToStringConverter<TEnum>
- Assembly
- Microsoft.EntityFrameworkCore.dll
Converts enum values to and from their string representation.
public class EnumToStringConverter<TEnum> : StringEnumConverter<TEnum, string, TEnum> where TEnum : struct, Enum
Type Parameters
TEnum
- Inheritance
-
ValueConverter<TEnum, string>StringEnumConverter<TEnum, string, TEnum>EnumToStringConverter<TEnum>
- Inherited Members
Remarks
See EF Core value converters for more information and examples.
Constructors
EnumToStringConverter()
Creates a new instance of this converter. This converter does not preserve order.
public EnumToStringConverter()
Remarks
See EF Core value converters for more information and examples.
EnumToStringConverter(ConverterMappingHints?)
Creates a new instance of this converter. This converter does not preserve order.
public EnumToStringConverter(ConverterMappingHints? mappingHints)
Parameters
mappingHints
ConverterMappingHintsHints that can be used by the ITypeMappingSource to create data types with appropriate facets for the converted data.
Remarks
See EF Core value converters for more information and examples.
Properties
DefaultInfo
A ValueConverterInfo for the default use of this converter.
public static ValueConverterInfo DefaultInfo { get; }