Table of Contents

Class AssociationMetadata

Namespace
LinqToDB.Metadata
Assembly
linq2db.Tools.dll

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

string

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

bool

Configuration

Mapping configuration name.

public string? Configuration { get; set; }

Property Value

string

ExpressionPredicate

Name of static method or property, that provides additional predicate, used by join/apply operation.

public string? ExpressionPredicate { get; set; }

Property Value

string

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

string

OtherKeyExpression

AST of code expression, used and value for OtherKey property setter.

public ICodeExpression? OtherKeyExpression { get; set; }

Property Value

ICodeExpression

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

string

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

string

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

string

ThisKeyExpression

AST of code expression, used and value for ThisKey property setter.

public ICodeExpression? ThisKeyExpression { get; set; }

Property Value

ICodeExpression