Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

StringToEnumConverter<TEnum> Class

Definition

Namespace:
Microsoft.EntityFrameworkCore.Storage.ValueConversion
Assembly:
Microsoft.EntityFrameworkCore.dll
Package:
Microsoft.EntityFrameworkCore v10.0.0
Package:
Microsoft.EntityFrameworkCore v2.2.6
Package:
Microsoft.EntityFrameworkCore v3.0.0
Package:
Microsoft.EntityFrameworkCore v3.1.0
Package:
Microsoft.EntityFrameworkCore v5.0.0
Package:
Microsoft.EntityFrameworkCore v6.0.0
Package:
Microsoft.EntityFrameworkCore v7.0.0
Package:
Microsoft.EntityFrameworkCore v8.0.0
Package:
Microsoft.EntityFrameworkCore v9.0.0
Source:
StringToEnumConverter.cs
Source:
StringToEnumConverter.cs
Source:
StringToEnumConverter.cs
Source:
StringToEnumConverter.cs
Source:
StringToEnumConverter.cs
Source:
StringToEnumConverter.cs
Source:
StringToEnumConverter.cs
Source:
StringToEnumConverter.cs
Source:
StringToEnumConverter.cs

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Converts strings to and from enum values.

[System.Runtime.CompilerServices.Nullable(new System.Byte[] { 0, 1, 0, 0 })]
public class StringToEnumConverter<TEnum> : Microsoft.EntityFrameworkCore.Storage.ValueConversion.Internal.StringEnumConverter<string,TEnum,TEnum> where TEnum : struct
public class StringToEnumConverter<TEnum> : Microsoft.EntityFrameworkCore.Storage.ValueConversion.Internal.StringEnumConverter<string,TEnum,TEnum> where TEnum : struct
[<System.Runtime.CompilerServices.Nullable(new System.Byte[] { 0, 1, 0, 0 })>]
type StringToEnumConverter<'Enum (requires 'Enum : struct)> = class
 inherit StringEnumConverter<string, 'Enum, 'Enum (requires 'Enum : struct and 'Enum : struct)>
type StringToEnumConverter<'Enum (requires 'Enum : struct)> = class
 inherit StringEnumConverter<string, 'Enum, 'Enum (requires 'Enum : struct and 'Enum : struct)>
Public Class StringToEnumConverter(Of TEnum)
Inherits StringEnumConverter(Of String, TEnum, TEnum)

Type Parameters

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

Remarks

See EF Core value converters for more information and examples.

Constructors

Name Description
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

Name Description
DefaultInfo

A ValueConverterInfo for the default use of this converter.

Applies to


Feedback

Was this page helpful?