Class ColumnMetadata
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
Configuration
Mapping configuration name.
public string? Configuration { get; set; }
Property Value
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
DataType
Column DataType type kind.
public DataType? DataType { get; set; }
Property Value
DbType
Column database type attributes.
public DatabaseType? DbType { get; set; }
Property Value
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
IsDiscriminator
Indicates that current column contains discriminator value for mapping with inheritance.
public bool IsDiscriminator { get; set; }
Property Value
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
IsPrimaryKey
Column is a part of primary key.
public bool IsPrimaryKey { get; set; }
Property Value
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
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
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
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
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
Storage
Field or property name to use as data storage in load operations.
public string? Storage { get; set; }