Table of Contents

Class ColumnMetadata

Namespace
LinqToDB.Metadata
Assembly
linq2db.Tools.dll

Column mapping attributes, used with ColumnAttribute mapping attribute.

public sealed class ColumnMetadata
Inheritance
ColumnMetadata
Extension Methods

Properties

CanBeNull

Nullability of column.

public bool CanBeNull { get; set; }

Property Value

bool

Configuration

Mapping configuration name.

public string? Configuration { get; set; }

Property Value

string

CreateFormat

Contains custom column create format string (SQL), used by create table APIs. See CreateFormat for more details.

public string? CreateFormat { get; set; }

Property Value

string

DataType

Column DataType type kind.

public DataType? DataType { get; set; }

Property Value

DataType?

DbType

Column database type attributes.

public DatabaseType? DbType { get; set; }

Property Value

DatabaseType

IsColumn

When set to false, marks member as non-column propery/field, which shold be ignored by linq2db. Default value: true.

public bool IsColumn { get; set; }

Property Value

bool

IsDiscriminator

Indicates that current column contains discriminator value for mapping with inheritance.

public bool IsDiscriminator { get; set; }

Property Value

bool

IsIdentity

Specify, that column value generated by database on record creation operation. Enables same behavior as SkipOnInsert and SkipOnUpdate properties and additionally provides support for identity retrieval on insert operations with identity retrieval (currently limited only to integer types).

public bool IsIdentity { get; set; }

Property Value

bool

IsPrimaryKey

Column is a part of primary key.

public bool IsPrimaryKey { get; set; }

Property Value

bool

MemberName

Contains mapped member name, when attribute applied not to member directly but to entity class/interface. See MemberName for more details.

public string? MemberName { get; set; }

Property Value

string

Name

Column name. When not specified, attribute owner (field or property) name will be used (with same casing).

public string? Name { get; set; }

Property Value

string

Order

Contains column ordinal for create table APIs.

public int? Order { get; set; }

Property Value

int?

PrimaryKeyOrder

Column ordinal in composite primary key.

public int? PrimaryKeyOrder { get; set; }

Property Value

int?

SkipOnEntityFetch

When set to true, column will be excuded from select operation with implicit columns. E.g. db.Table.ToList().

public bool SkipOnEntityFetch { get; set; }

Property Value

bool

SkipOnInsert

Specify, that column should be skipped on record creation operations (e.g. INSERT), except cases when user explicitly specify column in insert expression.

public bool SkipOnInsert { get; set; }

Property Value

bool

SkipOnUpdate

Specify, that column should be skipped on record update operations (e.g. UPDATE), except cases when user explicitly specify column in update expression.

public bool SkipOnUpdate { get; set; }

Property Value

bool

Storage

Field or property name to use as data storage in load operations.

public string? Storage { get; set; }

Property Value

string