NavigationProperty.Create Method (String, TypeUsage, RelationshipType, RelationshipEndMember, RelationshipEndMember, IEnumerable<MetadataProperty>)
Creates a NavigationProperty instance from the specified parameters.
Assembly: EntityFramework (in EntityFramework.dll)
public static NavigationProperty Create( string name, TypeUsage typeUsage, RelationshipType relationshipType, RelationshipEndMember from, RelationshipEndMember to, IEnumerable<MetadataProperty> metadataProperties )
Parameters
- name
-
Type:
System.String
The name of the navigation property.
- typeUsage
-
Type:
System.Data.Entity.Core.Metadata.Edm.TypeUsage
Specifies the navigation property type and its facets.
- relationshipType
-
Type:
System.Data.Entity.Core.Metadata.Edm.RelationshipType
The relationship type for the navigation.
- from
-
Type:
System.Data.Entity.Core.Metadata.Edm.RelationshipEndMember
The source end member in the navigation.
- to
-
Type:
System.Data.Entity.Core.Metadata.Edm.RelationshipEndMember
The target end member in the navigation.
- metadataProperties
-
Type:
System.Collections.Generic.IEnumerable<MetadataProperty>
The metadata properties of the navigation property.
Return Value
Type: System.Data.Entity.Core.Metadata.Edm.NavigationPropertyThe newly created NavigationProperty instance.