Share via


NavigationProperty.Create Method

Definition

Creates a NavigationProperty instance from the specified parameters.

public static System.Data.Entity.Core.Metadata.Edm.NavigationProperty Create (string name, System.Data.Entity.Core.Metadata.Edm.TypeUsage typeUsage, System.Data.Entity.Core.Metadata.Edm.RelationshipType relationshipType, System.Data.Entity.Core.Metadata.Edm.RelationshipEndMember from, System.Data.Entity.Core.Metadata.Edm.RelationshipEndMember to, System.Collections.Generic.IEnumerable<System.Data.Entity.Core.Metadata.Edm.MetadataProperty> metadataProperties);
static member Create : string * System.Data.Entity.Core.Metadata.Edm.TypeUsage * System.Data.Entity.Core.Metadata.Edm.RelationshipType * System.Data.Entity.Core.Metadata.Edm.RelationshipEndMember * System.Data.Entity.Core.Metadata.Edm.RelationshipEndMember * seq<System.Data.Entity.Core.Metadata.Edm.MetadataProperty> -> System.Data.Entity.Core.Metadata.Edm.NavigationProperty

Parameters

name
String

The name of the navigation property.

typeUsage
TypeUsage

Specifies the navigation property type and its facets.

relationshipType
RelationshipType

The relationship type for the navigation.

from
RelationshipEndMember

The source end member in the navigation.

to
RelationshipEndMember

The target end member in the navigation.

metadataProperties
IEnumerable<MetadataProperty>

The metadata properties of the navigation property.

Returns

The newly created NavigationProperty instance.

Applies to