Class EntityDescriptor
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
MappingSchemaMapping schema, associated with descriptor.
type
TypeMapping 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
Associations
Gets list of association descriptors for current entity.
public IReadOnlyList<AssociationDescriptor> Associations { get; }
Property Value
CalculatedMembers
Gets list of calculated column members (properties with IsColumn set to true
).
public IReadOnlyList<MemberAccessor>? CalculatedMembers { get; }
Property Value
Columns
Gets list of column descriptors for current entity.
public IReadOnlyList<ColumnDescriptor> Columns { get; }
Property Value
DynamicColumnsStore
Gets the dynamic columns store descriptor.
public ColumnDescriptor? DynamicColumnsStore { get; }
Property Value
HasCalculatedMembers
Returns true
, if entity has calculated columns.
Also see CalculatedMembers.
public bool HasCalculatedMembers { get; }
Property Value
InheritanceMapping
Gets list of inheritance mapping descriptors for current entity.
public IReadOnlyList<InheritanceMapping> InheritanceMapping { get; }
Property Value
InheritanceRoot
For entity descriptor with inheritance mapping gets descriptor of root (base) entity.
public EntityDescriptor? InheritanceRoot { get; }
Property Value
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:
- ColumnAttribute;
- PrimaryKeyAttribute;
- IdentityAttribute;
- ColumnAliasAttribute. Otherwise all supported members of scalar type will be used:
- public instance fields and properties;
- explicit interface implementation properties. Also see IsStructIsScalarType and ScalarTypeAttribute.
public bool IsColumnAttributeRequired { get; }
Property Value
this[string]
Gets column descriptor by member name.
public ColumnDescriptor? this[string memberName] { get; }
Parameters
memberName
stringMember 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
ObjectType
Gets mapping class type.
public Type ObjectType { get; }
Property Value
QueryFilterFunc
public Delegate? QueryFilterFunc { get; }
Property Value
SkipModificationFlags
Gets flags for which operation values are skipped.
public SkipModification SkipModificationFlags { get; }
Property Value
TableOptions
Gets or sets table options. See TableOptions enum for support information per provider.
public TableOptions TableOptions { get; }
Property Value
TypeAccessor
Gets mapping type accessor.
public TypeAccessor TypeAccessor { get; }
Property Value
Methods
FindAssociationDescriptor(MemberInfo)
Returns association descriptor based on its MemberInfo
public AssociationDescriptor? FindAssociationDescriptor(MemberInfo memberInfo)
Parameters
memberInfo
MemberInfo
Returns
FindColumnDescriptor(MemberInfo)
Returns column descriptor based on its MemberInfo
public ColumnDescriptor? FindColumnDescriptor(MemberInfo memberInfo)
Parameters
memberInfo
MemberInfo