Table of Contents

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

Property PropertyInfo

The entity property.

Name string

The column name (already through the dialect's naming convention or an explicit override).

Converter RelationalConverter

The value converter, or null when 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

RelationalConverter

Length

The maximum text length (0 = the dialect's default), from [Facet] / Facet(...).

public int Length { get; init; }

Property Value

int

Name

The column name (already through the dialect's naming convention or an explicit override).

public string Name { get; init; }

Property Value

string

Precision

The decimal precision (0 = the dialect's default).

public int Precision { get; init; }

Property Value

int

Property

The entity property.

public PropertyInfo Property { get; init; }

Property Value

PropertyInfo

Scale

The decimal scale (meaningful when Precision is set).

public int Scale { get; init; }

Property Value

int

StoredType

The stored CLR type — the converter's, or the member's own.

public Type StoredType { get; }

Property Value

Type

Methods

Read(object)

Reads the member from an entity as its stored value.

public object? Read(object entity)

Parameters

entity object

Returns

object

Store(object?)

Converts a value that is about to bind against this column into its stored form.

public object? Store(object? value)

Parameters

value object

Returns

object