Share via


AssociationType.Create Method

Definition

Creates a read-only AssociationType instance from the specified parameters.

public static System.Data.Entity.Core.Metadata.Edm.AssociationType Create (string name, string namespaceName, bool foreignKey, System.Data.Entity.Core.Metadata.Edm.DataSpace dataSpace, System.Data.Entity.Core.Metadata.Edm.AssociationEndMember sourceEnd, System.Data.Entity.Core.Metadata.Edm.AssociationEndMember targetEnd, System.Data.Entity.Core.Metadata.Edm.ReferentialConstraint constraint, System.Collections.Generic.IEnumerable<System.Data.Entity.Core.Metadata.Edm.MetadataProperty> metadataProperties);
static member Create : string * string * bool * System.Data.Entity.Core.Metadata.Edm.DataSpace * System.Data.Entity.Core.Metadata.Edm.AssociationEndMember * System.Data.Entity.Core.Metadata.Edm.AssociationEndMember * System.Data.Entity.Core.Metadata.Edm.ReferentialConstraint * seq<System.Data.Entity.Core.Metadata.Edm.MetadataProperty> -> System.Data.Entity.Core.Metadata.Edm.AssociationType

Parameters

name
String

The name of the association type.

namespaceName
String

The namespace of the association type.

foreignKey
Boolean

Flag that indicates a foreign key (FK) relationship.

dataSpace
DataSpace

The data space for the association type.

sourceEnd
AssociationEndMember

The source association end member.

targetEnd
AssociationEndMember

The target association end member.

constraint
ReferentialConstraint

A referential constraint.

metadataProperties
IEnumerable<MetadataProperty>

Metadata properties to be associated with the instance.

Returns

The newly created AssociationType instance.

Exceptions

The specified namespace is null or empty.

Applies to