Class RelationalColumn
- Namespace
- eQuantic.Core.Data.Relational
- Assembly
- eQuantic.Core.Data.Relational.dll
A mapped column: the entity property, its stored name and (optionally) its value converter.
public sealed record RelationalColumn : IEquatable<RelationalColumn>
- Inheritance
-
RelationalColumn
- Implements
- Inherited Members
Constructors
RelationalColumn(PropertyInfo, string, RelationalConverter?)
A mapped column: the entity property, its stored name and (optionally) its value converter.
public RelationalColumn(PropertyInfo Property, string Name, RelationalConverter? Converter = null)
Parameters
PropertyPropertyInfoThe entity property.
NamestringThe column name (already through the dialect's naming convention or an explicit override).
ConverterRelationalConverterThe value converter, or
nullwhen the member stores as-is.
Properties
Converter
The value converter, or null when the member stores as-is.
public RelationalConverter? Converter { get; init; }
Property Value
Length
The maximum text length (0 = the dialect's default), from [Facet] / Facet(...).
public int Length { get; init; }
Property Value
Name
The column name (already through the dialect's naming convention or an explicit override).
public string Name { get; init; }
Property Value
Precision
The decimal precision (0 = the dialect's default).
public int Precision { get; init; }
Property Value
Property
The entity property.
public PropertyInfo Property { get; init; }
Property Value
Scale
The decimal scale (meaningful when Precision is set).
public int Scale { get; init; }
Property Value
StoredType
The stored CLR type — the converter's, or the member's own.
public Type StoredType { get; }
Property Value
Methods
Read(object)
Reads the member from an entity as its stored value.
public object? Read(object entity)
Parameters
entityobject
Returns
Store(object?)
Converts a value that is about to bind against this column into its stored form.
public object? Store(object? value)
Parameters
valueobject