Table of Contents

Class EntityDescriptor

Namespace
LinqToDB.Mapping
Assembly
linq2db.dll

Stores mapping entity descriptor.

public class EntityDescriptor : IEntityChangeDescriptor
Inheritance
EntityDescriptor
Implements
Extension Methods

Constructors

EntityDescriptor(MappingSchema, Type, Action<MappingSchema, IEntityChangeDescriptor>?)

Creates descriptor instance.

public EntityDescriptor(MappingSchema mappingSchema, Type type, Action<MappingSchema, IEntityChangeDescriptor>? onEntityDescriptorCreated)

Parameters

mappingSchema MappingSchema

Mapping schema, associated with descriptor.

type Type

Mapping class type.

onEntityDescriptorCreated Action<MappingSchema, IEntityChangeDescriptor>

Properties

Aliases

Gets mapping dictionary to map column aliases to target columns or aliases.

public IReadOnlyDictionary<string, string>? Aliases { get; }

Property Value

IReadOnlyDictionary<string, string>

Associations

Gets list of association descriptors for current entity.

public IReadOnlyList<AssociationDescriptor> Associations { get; }

Property Value

IReadOnlyList<AssociationDescriptor>

CalculatedMembers

Gets list of calculated column members (properties with IsColumn set to true).

public IReadOnlyList<MemberAccessor>? CalculatedMembers { get; }

Property Value

IReadOnlyList<MemberAccessor>

Columns

Gets list of column descriptors for current entity.

public IReadOnlyList<ColumnDescriptor> Columns { get; }

Property Value

IReadOnlyList<ColumnDescriptor>

DynamicColumnsStore

Gets the dynamic columns store descriptor.

public ColumnDescriptor? DynamicColumnsStore { get; }

Property Value

ColumnDescriptor

HasCalculatedMembers

Returns true, if entity has calculated columns. Also see CalculatedMembers.

public bool HasCalculatedMembers { get; }

Property Value

bool

InheritanceMapping

Gets list of inheritance mapping descriptors for current entity.

public IReadOnlyList<InheritanceMapping> InheritanceMapping { get; }

Property Value

IReadOnlyList<InheritanceMapping>

InheritanceRoot

For entity descriptor with inheritance mapping gets descriptor of root (base) entity.

public EntityDescriptor? InheritanceRoot { get; }

Property Value

EntityDescriptor

IsColumnAttributeRequired

Gets or sets column mapping rules for current mapping class or interface. If true, properties and fields should be marked with one of those attributes to be used for mapping:

public bool IsColumnAttributeRequired { get; }

Property Value

bool

this[string]

Gets column descriptor by member name.

public ColumnDescriptor? this[string memberName] { get; }

Parameters

memberName string

Member name.

Property Value

ColumnDescriptor

Returns column descriptor or null, if descriptor not found.

Name

Gets name of table or view in database.

public SqlObjectName Name { get; }

Property Value

SqlObjectName

ObjectType

Gets mapping class type.

public Type ObjectType { get; }

Property Value

Type

QueryFilterFunc

public Delegate? QueryFilterFunc { get; }

Property Value

Delegate

SkipModificationFlags

Gets flags for which operation values are skipped.

public SkipModification SkipModificationFlags { get; }

Property Value

SkipModification

TableOptions

Gets or sets table options. See TableOptions enum for support information per provider.

public TableOptions TableOptions { get; }

Property Value

TableOptions

TypeAccessor

Gets mapping type accessor.

public TypeAccessor TypeAccessor { get; }

Property Value

TypeAccessor

Methods

FindAssociationDescriptor(MemberInfo)

Returns association descriptor based on its MemberInfo

public AssociationDescriptor? FindAssociationDescriptor(MemberInfo memberInfo)

Parameters

memberInfo MemberInfo

Returns

AssociationDescriptor

FindColumnDescriptor(MemberInfo)

Returns column descriptor based on its MemberInfo

public ColumnDescriptor? FindColumnDescriptor(MemberInfo memberInfo)

Parameters

memberInfo MemberInfo

Returns

ColumnDescriptor