AssociationSet.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 AssociationSet instance from the specified parameters.
public static System.Data.Entity.Core.Metadata.Edm.AssociationSet Create (string name, System.Data.Entity.Core.Metadata.Edm.AssociationType type, System.Data.Entity.Core.Metadata.Edm.EntitySet sourceSet, System.Data.Entity.Core.Metadata.Edm.EntitySet targetSet, System.Collections.Generic.IEnumerable<System.Data.Entity.Core.Metadata.Edm.MetadataProperty> metadataProperties);
static member Create : string * System.Data.Entity.Core.Metadata.Edm.AssociationType * System.Data.Entity.Core.Metadata.Edm.EntitySet * System.Data.Entity.Core.Metadata.Edm.EntitySet * seq<System.Data.Entity.Core.Metadata.Edm.MetadataProperty> -> System.Data.Entity.Core.Metadata.Edm.AssociationSet
Public Shared Function Create (name As String, type As AssociationType, sourceSet As EntitySet, targetSet As EntitySet, metadataProperties As IEnumerable(Of MetadataProperty)) As AssociationSet
Parameters
- name
- String
The name of the association set.
- type
- AssociationType
The association type of the elements in the association set.
- sourceSet
- EntitySet
The entity set for the source association set end.
- targetSet
- EntitySet
The entity set for the target association set end.
- metadataProperties
- IEnumerable<MetadataProperty>
Metadata properties to be associated with the instance.
Returns
The newly created AssociationSet instance.
Exceptions
The entity type of one of the ends of the specified association type does not match the entity type of the corresponding entity set end.
The specified association type is null.
Applies to
Entity Framework