Share via


EntityTypeConfiguration<TEntityType>.HasMany<TTargetEntity> Method

Configures a many relationship from this entity type.

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

Syntax

'Declaration
Public Function HasMany(Of TTargetEntity As Class) ( _
    navigationPropertyExpression As Expression(Of Func(Of TEntityType, IEnumerable(Of TTargetEntity))) _
) As NavigationPropertyConfiguration
'Usage
Dim instance As EntityTypeConfiguration 
Dim navigationPropertyExpression As Expression(Of Func(Of TEntityType, IEnumerable(Of TTargetEntity)))
Dim returnValue As NavigationPropertyConfiguration 

returnValue = instance.HasMany(navigationPropertyExpression)
public NavigationPropertyConfiguration HasMany<TTargetEntity>(
    Expression<Func<TEntityType, IEnumerable<TTargetEntity>>> navigationPropertyExpression
)
where TTargetEntity : class
public:
generic<typename TTargetEntity>
where TTargetEntity : ref class 
NavigationPropertyConfiguration^ HasMany(
    Expression<Func<TEntityType, IEnumerable<TTargetEntity>^>^>^ navigationPropertyExpression
)
member HasMany : 
        navigationPropertyExpression:Expression<Func<'TEntityType, IEnumerable<'TTargetEntity>>> -> NavigationPropertyConfiguration   when 'TTargetEntity : not struct
JScript does not support generic types and methods.

Type Parameters

  • TTargetEntity
    The type of the entity at the other end of the relationship.

Parameters

Return Value

Type: System.Web.Http.OData.Builder.NavigationPropertyConfiguration
A configuration object that can be used to further configure the relationship.

See Also

Reference

EntityTypeConfiguration<TEntityType> Class

System.Web.Http.OData.Builder Namespace