linq2db by Igor Tkachev, Ilya Chudin, Svyatoslav Danyliv, Dmitry Lukashenko

<PackageReference Include="linq2db" Version="2.9.6" />

.NET API 2,457,088 bytes

 ColumnDescriptor

Stores mapping entity column descriptor.
public bool CanBeNull { get; }

Gets whether a column can contain null values.

public string ColumnName { get; }

Gets the name of a column in database. If not specified, MemberName value will be used.

public string CreateFormat { get; }

Custom template for column definition in create table SQL expression, generated using CreateTable<T> methods. Template accepts following string parameters: - {0} - column name; - {1} - column type; - {2} - NULL specifier; - {3} - identity specification.

public DataType DataType { get; }

Gets LINQ to DB type for column.

public string DbType { get; }

Gets the name of the database column type.

public bool HasValuesToSkipOnInsert { get; }

Gets whether the column has specific values that should be skipped on insert.

public bool HasValuesToSkipOnUpdate { get; }

Gets whether the column has specific values that should be skipped on update.

public bool IsDiscriminator { get; }

Gets whether a column contains a discriminator value for a LINQ to DB inheritance hierarchy. InheritanceMappingAttribute for more details. Default value: false.

public bool IsIdentity { get; }

Gets whether a column contains values that the database auto-generates.

public bool IsPrimaryKey { get; }

Gets whether this member represents a column that is part or all of the primary key of the table. Also see PrimaryKeyAttribute.

public int? Length { get; }

Gets the length of the database column.

Gets column mapping member accessor.

public MemberInfo MemberInfo { get; }

Gets column mapping member (field or property).

public string MemberName { get; }

Gets the name of mapped member. When applied to class or interface, should contain name of property of field. If column is mapped to a property or field of composite object, MemberName should contain a path to that member using dot as separator. public class Address { public string City { get; set; } public string Street { get; set; } public int Building { get; set; } } [Column("city", "Residence.Street")] [Column("user_name", "Name")] public class User { public string Name; [Column("street", ".Street")] [Column("building_number", MemberName = ".Building")] public Address Residence { get; set; } }

public Type MemberType { get; }

Gets type of column mapping member (field or property).

public int? Order { get; }

Sort order for column list. Positive values first, then unspecified (null), then negative values.

public int? Precision { get; }

Gets the precision of the database column.

public int PrimaryKeyOrder { get; }

Gets order of current column in composite primary key. Order is used for query generation to define in which order primary key columns must be mentioned in query from columns with smallest order value to greatest.

public int? Scale { get; }

Gets the Scale of the database column.

Gets sequence name for specified column.

Gets flags for which operation values are skipped.

public bool SkipOnInsert { get; }

Gets whether a column is insertable. This flag will affect only insert operations with implicit columns specification like Insert<T> method and will be ignored when user explicitly specifies value for this column.

public bool SkipOnUpdate { get; }

Gets whether a column is updatable. This flag will affect only update operations with implicit columns specification like Update<T> method and will be ignored when user explicitly specifies value for this column.

public string Storage { get; }

Gets storage property or field to hold the value from a column. Could be usefull e.g. in combination of private storage field and getter-only mapping property.

public MemberInfo StorageInfo { get; }

Gets value storage member (field or property).

public Type StorageType { get; }

Gets type of column value storage member (field or property).

public ColumnDescriptor(MappingSchema mappingSchema, ColumnAttribute columnAttribute, MemberAccessor memberAccessor)

Creates descriptor instance.

public virtual object GetValue(MappingSchema mappingSchema, object obj)

Extracts column value, converted to database type, from entity object.

public virtual bool ShouldSkip(object obj, EntityDescriptor descriptor, SkipModification flags)

Checks if the passed object has values that should bes skipped based on the given flags.