Back to Devexpress

AssociationAttribute.UseAssociationNameAsIntermediateTableName Property

xpo-devexpress-dot-xpo-dot-associationattribute.md

latest2.1 KB
Original Source

AssociationAttribute.UseAssociationNameAsIntermediateTableName Property

Gets or sets whether the association’s name is used as the name of a junction table in a many-to-many relationship.

Namespace : DevExpress.Xpo

Assembly : DevExpress.Xpo.v25.2.dll

NuGet Package : DevExpress.Xpo

Declaration

csharp
public bool UseAssociationNameAsIntermediateTableName { get; set; }
vb
Public Property UseAssociationNameAsIntermediateTableName As Boolean

Property Value

TypeDescription
Boolean

true to use the association’s name as the name of a junction table; otherwise, false.

|

Remarks

This property is applied to both sides of many-to-many associations. The following example demonstrates how to apply AssociationAttribute and set the UseAssociationNameAsIntermediateTableName property.

csharp
[Association("YourAssociation", UseAssociationNameAsIntermediateTableName = true)]
public XPCollection<YourChildType> Children {
    // ...
}
vb
Imports DevExpress.Xpo
' ...
<Association("YourAssociation", UseAssociationNameAsIntermediateTableName := True)>
Public ReadOnly Property Children() As XPCollection(Of YourChildType)
    ' ...
End Property

See Also

Name

AssociationAttribute Class

AssociationAttribute Members

DevExpress.Xpo Namespace