Table of Contents

Class DateTimeOffsetToBytesConverter

Namespace
Microsoft.EntityFrameworkCore.Storage.ValueConversion
Assembly
Microsoft.EntityFrameworkCore.dll

Converts DateTime to and from arrays of bytes.

public class DateTimeOffsetToBytesConverter : ValueConverter<DateTimeOffset, byte[]>
Inheritance
DateTimeOffsetToBytesConverter
Inherited Members

Remarks

See EF Core value converters for more information and examples.

Constructors

DateTimeOffsetToBytesConverter()

Creates a new instance of this converter.

public DateTimeOffsetToBytesConverter()

Remarks

See EF Core value converters for more information and examples.

DateTimeOffsetToBytesConverter(ConverterMappingHints?)

Creates a new instance of this converter.

public DateTimeOffsetToBytesConverter(ConverterMappingHints? mappingHints)

Parameters

mappingHints ConverterMappingHints

Hints 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; }

Property Value

ValueConverterInfo

Methods

FromBytes(byte[])

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

[EntityFrameworkInternal]
public static DateTimeOffset FromBytes(byte[] bytes)

Parameters

bytes byte[]

Returns

DateTimeOffset

ToBytes(DateTimeOffset)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

[EntityFrameworkInternal]
public static byte[] ToBytes(DateTimeOffset value)

Parameters

value DateTimeOffset

Returns

byte[]