Table of Contents

Class RelationalConverter

Namespace
eQuantic.Core.Data.Relational
Assembly
eQuantic.Core.Data.Relational.dll

A member's value converter: how a domain type (a Value Object, an enum-as-string) maps to its stored scalar.

public sealed record RelationalConverter : IEquatable<RelationalConverter>
Inheritance
RelationalConverter
Implements
Inherited Members

Constructors

RelationalConverter(Type, Func<object?, object?>, Func<object?, object?>)

A member's value converter: how a domain type (a Value Object, an enum-as-string) maps to its stored scalar.

public RelationalConverter(Type StoredType, Func<object?, object?> ToStored, Func<object?, object?> FromStored)

Parameters

StoredType Type

The stored CLR type (drives the DDL column type and parameter binding).

ToStored Func<object, object>

Converts the member value into the stored value.

FromStored Func<object, object>

Converts the stored value back into the member value.

Properties

FromStored

Converts the stored value back into the member value.

public Func<object?, object?> FromStored { get; init; }

Property Value

Func<object, object>

StoredType

The stored CLR type (drives the DDL column type and parameter binding).

public Type StoredType { get; init; }

Property Value

Type

ToStored

Converts the member value into the stored value.

public Func<object?, object?> ToStored { get; init; }

Property Value

Func<object, object>