Microsoft.EntityFrameworkCore.Storage.ValueConversion Namespace

Classes

BoolToStringConverter

Converts Boolean values to and from two string values.

BoolToTwoValuesConverter<TProvider>

Converts Boolean values to and from two different values.

BoolToZeroOneConverter<TProvider>

Converts Boolean values to and from 0 and 1.

BytesToStringConverter

Converts arrays of bytes to and from strings.

CastingConverter<TModel,TProvider>

Converts TModel to and from TProvider using simple casts from one type to the other.

CharToStringConverter

Converts a Char to and from a single-character String.

ConverterMappingHints

Specifies hints used by the type mapper when mapping using a ValueConverter.

DateTimeOffsetToBinaryConverter

Converts DateTime to and from binary representation in a long. The DateTime is truncated beyond 0.1 millisecond precision.

DateTimeOffsetToBytesConverter

Converts DateTime to and from arrays of bytes.

DateTimeOffsetToStringConverter

Converts DateTimeOffset to and from strings.

DateTimeToBinaryConverter

Converts DateTime using ToBinary(). This will preserve the DateTimeKind.

DateTimeToStringConverter

Converts DateTime to and from strings.

DateTimeToTicksConverter

Converts DateTime to and Ticks.

EnumToNumberConverter<TEnum,TNumber>

Converts enum values to and from their underlying numeric representation.

EnumToStringConverter<TEnum>

Converts enum values to and from their string representation.

GuidToBytesConverter

Converts a Guid to and from an array of Byte.

GuidToStringConverter

Converts a Guid to and from a String using the standard "8-4-4-4-12" format./>.

IPAddressToBytesConverter

Converts a IPAddress to and from a Byte.

IPAddressToStringConverter

Converts a IPAddress to and from a String.

NumberToBytesConverter<TNumber>

Converts numeric values to and from arrays of bytes.

NumberToStringConverter<TNumber>

Converts numeric values to and from their string representation.

PhysicalAddressToBytesConverter

Converts a PhysicalAddress to and from a Byte.

PhysicalAddressToStringConverter

Converts a PhysicalAddress to and from a String.

RelationalConverterMappingHints

Specifies hints used by the type mapper when mapping using a ValueConverter.

StringToBoolConverter

Converts strings to and from Boolean values.

StringToBytesConverter

Converts strings to and from arrays of bytes.

StringToCharConverter

Converts strings to and from Char values.

StringToDateTimeConverter

Converts strings to and from DateTime values.

StringToDateTimeOffsetConverter

Converts strings to and from DateTimeOffset values.

StringToEnumConverter<TEnum>

Converts strings to and from enum values.

StringToGuidConverter

Converts strings to and from a Guid using the standard "8-4-4-4-12" format./>.

StringToNumberConverter<TNumber>

Converts strings to and from numeric values.

StringToTimeSpanConverter

Converts strings to and from TimeSpan values.

StringToUriConverter

Converts strings to and from Uri values.

TimeSpanToStringConverter

Converts TimeSpan to and from strings.

TimeSpanToTicksConverter

Converts TimeSpan to and Ticks.

UriToStringConverter

Converts a Uri to and from a String.

ValueConverter

Defines conversions from an object of one type in a model to an object of the same or different type in the store.

ValueConverter<TModel,TProvider>

Defines conversions from an object of one type in a model to an object of the same or different type in the store.

ValueConverterSelector

A registry of ValueConverter instances that can be used to find the preferred converter to use to convert to and from a given model type to a type that the database provider supports.

The service lifetime is Singleton. This means a single instance is used by many DbContext instances. The implementation must be thread-safe. This service cannot depend on services registered as Scoped.

ValueConverterSelectorDependencies

Service dependencies parameter class for ValueConverterSelector

This type is typically used by database providers (and other extensions). It is generally not used in application code.

Do not construct instances of this class directly from either provider or application code as the constructor signature may change as new dependencies are added. Instead, use this type in your constructor so that an instance will be created and injected automatically by the dependency injection container. To create an instance with some dependent services replaced, first resolve the object from the dependency injection container, then replace selected services using the 'With...' methods. Do not call the constructor at any point in this process.

The service lifetime is Singleton. This means a single instance of each service is used by many DbContext instances. The implementation must be thread-safe. This service cannot depend on services registered as Scoped.

Structs

ValueConverterInfo

Contains information on an available ValueConverter including a factory to create an instance.

Interfaces

IValueConverterSelector

A registry of ValueConverterInfo that can be used to find the preferred converter to use to convert to and from a given model type to a type that the database provider supports.

The service lifetime is Singleton. This means a single instance is used by many DbContext instances. The implementation must be thread-safe. This service cannot depend on services registered as Scoped.