Share via


EntityTypeConfiguration.AddNavigationProperty Method

Adds a new EDM navigation property to this entity type.

Namespace:  System.Web.Http.OData.Builder
Assembly:  System.Web.Http.OData (in System.Web.Http.OData.dll)

Syntax

'Declaration
Public Overridable Function AddNavigationProperty ( _
    navigationProperty As PropertyInfo, _
    multiplicity As EdmMultiplicity _
) As NavigationPropertyConfiguration
'Usage
Dim instance As EntityTypeConfiguration 
Dim navigationProperty As PropertyInfo 
Dim multiplicity As EdmMultiplicity 
Dim returnValue As NavigationPropertyConfiguration 

returnValue = instance.AddNavigationProperty(navigationProperty, _
    multiplicity)
public virtual NavigationPropertyConfiguration AddNavigationProperty(
    PropertyInfo navigationProperty,
    EdmMultiplicity multiplicity
)
public:
virtual NavigationPropertyConfiguration^ AddNavigationProperty(
    PropertyInfo^ navigationProperty, 
    EdmMultiplicity multiplicity
)
abstract AddNavigationProperty : 
        navigationProperty:PropertyInfo * 
        multiplicity:EdmMultiplicity -> NavigationPropertyConfiguration  
override AddNavigationProperty : 
        navigationProperty:PropertyInfo * 
        multiplicity:EdmMultiplicity -> NavigationPropertyConfiguration
public function AddNavigationProperty(
    navigationProperty : PropertyInfo, 
    multiplicity : EdmMultiplicity
) : NavigationPropertyConfiguration

Parameters

  • multiplicity
    Type: EdmMultiplicity
    The EdmMultiplicity of the navigation property.

Return Value

Type: System.Web.Http.OData.Builder.NavigationPropertyConfiguration
Returns the NavigationPropertyConfiguration of the added property.

See Also

Reference

EntityTypeConfiguration Class

System.Web.Http.OData.Builder Namespace