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.


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

[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 {

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