AssociationType.Create Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
Entity Framework
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for