DateTimeToStringConverter Class

Definition

Converts DateTime to and from strings.

public class DateTimeToStringConverter : Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter<DateTime,string>
public class DateTimeToStringConverter : Microsoft.EntityFrameworkCore.Storage.ValueConversion.Internal.StringDateTimeConverter<DateTime,string>
type DateTimeToStringConverter = class
    inherit ValueConverter<DateTime, string>
type DateTimeToStringConverter = class
    inherit StringDateTimeConverter<DateTime, string>
Public Class DateTimeToStringConverter
Inherits ValueConverter(Of DateTime, String)
Public Class DateTimeToStringConverter
Inherits StringDateTimeConverter(Of DateTime, String)
Inheritance
DateTimeToStringConverter
Inheritance
Microsoft.EntityFrameworkCore.Storage.ValueConversion.Internal.StringDateTimeConverter<DateTime,String>
DateTimeToStringConverter

Remarks

See EF Core value converters for more information.

Constructors

DateTimeToStringConverter()

Creates a new instance of this converter.

DateTimeToStringConverter(ConverterMappingHints)

Creates a new instance of this converter.

Properties

ConvertFromProvider

Gets the function to convert objects when reading data from the store, setup to handle nulls, boxing, and non-exact matches of simple types.

(Inherited from ValueConverter<TModel,TProvider>)
ConvertFromProviderExpression

Gets the expression to convert objects when reading data from the store, exactly as supplied and may not handle nulls, boxing, and non-exact matches of simple types.

(Inherited from ValueConverter<TModel,TProvider>)
ConvertsNulls

If true, then the nulls will be passed to the converter for conversion. Otherwise null values always remain null.

By default, value converters do not handle nulls so that a value converter for a non-nullable property (such as a primary key) can be used for correlated nullable properties, such as any corresponding foreign key properties.

(Inherited from ValueConverter)
ConvertToProvider

Gets the function to convert objects when writing data to the store, setup to handle nulls, boxing, and non-exact matches of simple types.

(Inherited from ValueConverter<TModel,TProvider>)
ConvertToProviderExpression

Gets the expression to convert objects when writing data to the store, exactly as supplied and may not handle nulls, boxing, and non-exact matches of simple types.

(Inherited from ValueConverter<TModel,TProvider>)
DefaultInfo

A ValueConverterInfo for the default use of this converter.

MappingHints

Hints that can be used by the ITypeMappingSource to create data types with appropriate facets for the converted data.

(Inherited from ValueConverter)
ModelClrType

The CLR type used in the EF model.

(Inherited from ValueConverter<TModel,TProvider>)
ProviderClrType

The CLR type used when reading and writing from the store.

(Inherited from ValueConverter<TModel,TProvider>)

Methods

ComposeWith(ValueConverter)

Composes another ValueConverter instance with this one such that the result of the first conversion is used as the input to the second conversion.

(Inherited from ValueConverter)

Applies to