共用方式為


AssociationAttribute.MultivalueType Property

Gets or sets the directionality of the association and whether it is single-valued or multi-valued.

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

Syntax

'Declaration
Public Property MultivalueType As AssociationType
    Get
    Set
'Usage
Dim instance As AssociationAttribute
Dim value As AssociationType

value = instance.MultivalueType

instance.MultivalueType = value
public AssociationType MultivalueType { get; set; }

Property Value

Type: Microsoft.SharePoint.Linq.AssociationType
An AssociationType that specifies the directionality of the association and whether it is single-valued or multi-valued.

Examples

The following example shows the MultivalueType property being used in an [Association] 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 {
        this._manager.Assign(value);
    }
}

See Also

Reference

AssociationAttribute Class

AssociationAttribute Members

Microsoft.SharePoint.Linq Namespace