Class AssociationMetadata
Association (foreign key relation) mapping attributes.
public sealed class AssociationMetadata
- Inheritance
-
AssociationMetadata
- Extension Methods
Properties
Alias
Optional table alias name to use in generated SQL for relation instead of name, generated by linq2db.
public string? Alias { get; set; }
Property Value
CanBeNull
Specify type of join operation to generate. When true
, linq2db will generate outer join orapply operation.
When false
- inner join/apply will be generated.
public bool CanBeNull { get; set; }
Property Value
Configuration
Mapping configuration name.
public string? Configuration { get; set; }
Property Value
ExpressionPredicate
Name of static method or property, that provides additional predicate, used by join/apply operation.
public string? ExpressionPredicate { get; set; }
Property Value
OtherKey
Comma-separated list of properties/fields, mapped to other (target) side of relation keys, used to generate join condition. Must have same order ass ThisKey value.
public string? OtherKey { get; set; }
Property Value
OtherKeyExpression
AST of code expression, used and value for OtherKey property setter.
public ICodeExpression? OtherKeyExpression { get; set; }
Property Value
QueryExpressionMethod
Name of static method or property, that provides assocation query expression, which will be used for SQL generation instead of join by foreign key fields.
public string? QueryExpressionMethod { get; set; }
Property Value
Storage
Field or property name to use as association data storage in eager load operations with assiation materialization.
public string? Storage { get; set; }
Property Value
ThisKey
Comma-separated list of properties/fields, mapped to this (source) side of relation keys, used to generate join condition. Must have same order ass OtherKey value.
public string? ThisKey { get; set; }
Property Value
ThisKeyExpression
AST of code expression, used and value for ThisKey property setter.
public ICodeExpression? ThisKeyExpression { get; set; }