BindingPathConfiguration<TStructuralType>.HasOptionalBinding 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.
Overloads
HasOptionalBinding<TTargetType,TDerivedType>(Expression<Func<TDerivedType,TTargetType>>, String) |
Configures an one-to-one path of the derived type for this binding path and binds the corresponding navigation property to the given entity set. |
HasOptionalBinding<TTargetType>(Expression<Func<TStructuralType,TTargetType>>, String) |
Configures an optional one-to-one path for this binding path and binds the corresponding navigation property to the given entity set. |
HasOptionalBinding<TTargetType,TDerivedType>(Expression<Func<TDerivedType,TTargetType>>, String)
Configures an one-to-one path of the derived type for this binding path and binds the corresponding navigation property to the given entity set.
public Microsoft.AspNet.OData.Builder.NavigationPropertyBindingConfiguration HasOptionalBinding<TTargetType,TDerivedType> (System.Linq.Expressions.Expression<Func<TDerivedType,TTargetType>> navigationExpression, string targetEntitySet) where TTargetType : class where TDerivedType : class, TStructuralType;
member this.HasOptionalBinding : System.Linq.Expressions.Expression<Func<#'StructuralType, 'argetType>> * string -> Microsoft.AspNet.OData.Builder.NavigationPropertyBindingConfiguration (requires 'argetType : null)
Public Function HasOptionalBinding(Of TTargetType As Class, TDerivedType As Class) (navigationExpression As Expression(Of Func(Of TDerivedType, TTargetType)), targetEntitySet As String) As NavigationPropertyBindingConfiguration
Type Parameters
- TTargetType
The target navigation source type.
- TDerivedType
The derived structural type.
Parameters
- navigationExpression
- Expression<Func<TDerivedType,TTargetType>>
A lambda expression representing the navigation property for the relationship.
For example, in C# t => t.MyProperty
and in Visual Basic .NET Function(t) t.MyProperty
.
- targetEntitySet
- String
The target navigation source (entity set) name for the binding.
Returns
A configuration object NavigationPropertyBindingConfiguration that can be used to further configure the relationship further.
Applies to
HasOptionalBinding<TTargetType>(Expression<Func<TStructuralType,TTargetType>>, String)
Configures an optional one-to-one path for this binding path and binds the corresponding navigation property to the given entity set.
public Microsoft.AspNet.OData.Builder.NavigationPropertyBindingConfiguration HasOptionalBinding<TTargetType> (System.Linq.Expressions.Expression<Func<TStructuralType,TTargetType>> navigationExpression, string targetEntitySet) where TTargetType : class;
member this.HasOptionalBinding : System.Linq.Expressions.Expression<Func<'StructuralType, 'argetType>> * string -> Microsoft.AspNet.OData.Builder.NavigationPropertyBindingConfiguration (requires 'argetType : null)
Public Function HasOptionalBinding(Of TTargetType As Class) (navigationExpression As Expression(Of Func(Of TStructuralType, TTargetType)), targetEntitySet As String) As NavigationPropertyBindingConfiguration
Type Parameters
- TTargetType
The target navigation source type.
Parameters
- navigationExpression
- Expression<Func<TStructuralType,TTargetType>>
A lambda expression representing the navigation property for the relationship.
For example, in C# t => t.MyProperty
and in Visual Basic .NET Function(t) t.MyProperty
.
- targetEntitySet
- String
The target navigation source (entity set) name for the binding.
Returns
A configuration object NavigationPropertyBindingConfiguration that can be used to further configure the relationship further.