Table of Contents

Interface IPropertyMetadata

Namespace
NextORM.Core
Assembly
nextorm.core.dll

Read-only mapping metadata for a single entity property: its CLR member and target column.

public interface IPropertyMetadata
Extension Methods

Remarks

Renamed from IPropertyMeta for consistency with the surrounding metadata types. See docs/specs/design/API-NAMING-REVIEW.md finding P1-11.

Properties

Collation

The provider-native collation declared for the property's column, or null when the column follows the database default. Declared with CollationAttribute or set fluently with Collation(string). The value is applied to the column in collation-sensitive query operations; SupportsCollation must be true. The default implementation returns null so existing external implementations keep compiling.

string? Collation { get; }

Property Value

string

ColumnName

The column that PropertyInfo maps to.

string ColumnName { get; }

Property Value

string

Converter

The value converter that maps the property between its CLR model type and the provider representation, or null when the property is stored as its model type. Declared with ValueConverterAttribute or JsonColumnAttribute, or set fluently with HasConversion(IPropertyValueConverter) or JsonColumn(Action<JsonColumnOptions>?). The default implementation returns null so existing external implementations keep compiling.

IPropertyValueConverter? Converter { get; }

Property Value

IPropertyValueConverter

DecimalPrecision

The decimal precision declared for the property (the total number of digits), or null when the bound column type is not decimal or no precision is declared. Declared with DecimalPrecisionAttribute or set fluently with DecimalPrecision(int, int). A provider that needs a column precision (for example the table-valued parameter column metadata) uses it; otherwise the provider default applies. The default implementation returns null so existing external implementations keep compiling.

int? DecimalPrecision { get; }

Property Value

int?

DecimalScale

The decimal scale declared for the property (the number of digits to the right of the decimal point), or null when the bound column type is not decimal or no scale is declared. Declared together with DecimalPrecision with DecimalPrecisionAttribute or set fluently with DecimalPrecision(int, int). The default implementation returns null so existing external implementations keep compiling.

int? DecimalScale { get; }

Property Value

int?

DurationPrecision

The fractional-second precision of a native duration type (for example TIME(3)), or zero for the provider default. Declared with Precision or the fluent duration mapping. The default implementation returns zero so existing external implementations keep compiling.

int DurationPrecision { get; }

Property Value

int

DurationUnit

The unit in which a TimeSpan property is stored on a provider without a native duration type, or null when the property is not a duration or uses the provider's native type. Declared with DurationAttribute or set fluently with Duration(DurationUnit, int). The default implementation returns null so existing external implementations keep compiling.

DurationUnit? DurationUnit { get; }

Property Value

DurationUnit?

IsColumnNameAuto

Whether ColumnName was derived from the property name rather than declared with an attribute or a fluent mapping. An active INamingConvention is applied only to auto names. The default implementation returns false (treat an unknown mapping as declared) so existing external implementations keep compiling.

bool IsColumnNameAuto { get; }

Property Value

bool

IsComputed

Whether the database generates the property's value and it can never be written (a computed column). Such a property is excluded from the values written by an insert. Declared with DatabaseGeneratedAttribute or set fluently with Computed(). The default implementation returns false so existing external implementations keep compiling.

bool IsComputed { get; }

Property Value

bool

IsDynamicColumnsStore

Whether the property is the entity's dynamic-columns store: it receives the columns of a read row that are not mapped to a declared member instead of mapping to a column itself. Declared with DynamicColumnsAttribute or set fluently with DynamicColumnsStore(). A dynamic-columns store is not part of Properties; it is exposed through DynamicColumnsStore. The default implementation returns false so existing external implementations keep compiling.

bool IsDynamicColumnsStore { get; }

Property Value

bool

IsIdentity

Whether the database generates the property's value (an identity/auto-increment column). Such a property is excluded from the values written by an insert. Declared with DatabaseGeneratedAttribute or set fluently with Identity(). The default implementation returns false so existing external implementations keep compiling.

bool IsIdentity { get; }

Property Value

bool

IsKey

Whether the property is (part of) the entity key. Declared with KeyAttribute, inferred from the Id/<TypeName>Id convention, or set fluently with Key(). Used by the DML builders to address a row; the default implementation returns false so existing external implementations keep compiling.

bool IsKey { get; }

Property Value

bool

PropertyInfo

The CLR property this mapping describes.

PropertyInfo PropertyInfo { get; }

Property Value

PropertyInfo

RangeColumns

The column-pair descriptor of a Range<T> property stored as two scalar columns, or null when the property maps to a single column. Declared with RangeColumnsAttribute or set fluently with RangeColumns(string, string, bool, bool). The default implementation returns null so existing external implementations keep compiling.

RangeColumnsMetadata? RangeColumns { get; }

Property Value

RangeColumnsMetadata