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
StoredTypeTypeThe stored CLR type (drives the DDL column type and parameter binding).
ToStoredFunc<object, object>Converts the member value into the stored value.
FromStoredFunc<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
StoredType
The stored CLR type (drives the DDL column type and parameter binding).
public Type StoredType { get; init; }
Property Value
ToStored
Converts the member value into the stored value.
public Func<object?, object?> ToStored { get; init; }