EntitySetConfiguration<TEntityType>.HasManyBinding<TTargetType> Method (Expression<Func<TEntityType, IEnumerable<TTargetType>>>, String)
Configures a many relationship from this entity type and binds the corresponding navigation property to the given entity set.
Namespace: System.Web.Http.OData.Builder
Assembly: System.Web.Http.OData (in System.Web.Http.OData.dll)
Syntax
'Declaration
Public Function HasManyBinding(Of TTargetType As Class) ( _
navigationExpression As Expression(Of Func(Of TEntityType, IEnumerable(Of TTargetType))), _
entitySetName As String _
) As NavigationPropertyBindingConfiguration
'Usage
Dim instance As EntitySetConfiguration
Dim navigationExpression As Expression(Of Func(Of TEntityType, IEnumerable(Of TTargetType)))
Dim entitySetName As String
Dim returnValue As NavigationPropertyBindingConfiguration
returnValue = instance.HasManyBinding(navigationExpression, _
entitySetName)
public NavigationPropertyBindingConfiguration HasManyBinding<TTargetType>(
Expression<Func<TEntityType, IEnumerable<TTargetType>>> navigationExpression,
string entitySetName
)
where TTargetType : class
public:
generic<typename TTargetType>
where TTargetType : ref class
NavigationPropertyBindingConfiguration^ HasManyBinding(
Expression<Func<TEntityType, IEnumerable<TTargetType>^>^>^ navigationExpression,
String^ entitySetName
)
member HasManyBinding :
navigationExpression:Expression<Func<'TEntityType, IEnumerable<'TTargetType>>> *
entitySetName:string -> NavigationPropertyBindingConfiguration when 'TTargetType : not struct
JScript does not support generic types and methods.
Type Parameters
- TTargetType
The target entity set type.
Parameters
- navigationExpression
Type: System.Linq.Expressions.Expression<Func<TEntityType, IEnumerable<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.
- entitySetName
Type: System.String
The target entity set name for the binding. It will be created if it does not exist.
Return Value
Type: System.Web.Http.OData.Builder.NavigationPropertyBindingConfiguration
A configuration object that can be used to further configure the relationship.