AssociationAttribute Class

Specifies that the property (mapped to a list field) has an association to another list, such as when the property is mapped to a lookup field.

Inheritance Hierarchy


Namespace:  Microsoft.SharePoint.Linq
Assembly:  Microsoft.SharePoint.Linq (in Microsoft.SharePoint.Linq.dll)


<AttributeUsageAttribute(AttributeTargets.Property Or AttributeTargets.Field, AllowMultiple := False)> _
Public NotInheritable Class AssociationAttribute _
    Inherits DataAttribute
Dim instance As AssociationAttribute
[AttributeUsageAttribute(AttributeTargets.Property|AttributeTargets.Field, AllowMultiple = false)]
public sealed class AssociationAttribute : DataAttribute


The following example shows the attribute used in the declaration of a property that represents a Lookup column to a Managers list.

[Association(Name="Manager", Storage="_manager", MultivalueType=AssociationType.Multi, List="Managers")]
public EntitySet<Item> Manager {
    get {
        return this._manager;
    set {

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also


AssociationAttribute Members

Microsoft.SharePoint.Linq Namespace