EntityTypeConfiguration<TEntityType>.HasMany<TTargetEntity> Method (Expression<Func<TEntityType, IEnumerable<TTargetEntity>>>)
Configures a many relationship from this entity type.
Namespace: System.Web.OData.Builder
Assembly: System.Web.OData (in System.Web.OData.dll)
Syntax
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<'TTargetEntity when 'TTargetEntity : not struct> :
navigationPropertyExpression:Expression<Func<'TEntityType, IEnumerable<'TTargetEntity>>> -> NavigationPropertyConfiguration
Public Function HasMany(Of TTargetEntity As Class) (
navigationPropertyExpression As Expression(Of Func(Of TEntityType, IEnumerable(Of TTargetEntity)))
) As NavigationPropertyConfiguration
Parameters
navigationPropertyExpression
Type: System.Linq.Expressions.Expression<Func<TEntityType, IEnumerable<TTargetEntity>>>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.
Return Value
Type: System.Web.OData.Builder.NavigationPropertyConfiguration
A configuration object that can be used to further configure the relationship.
Type Parameters
- TTargetEntity
The type of the entity at the other end of the relationship.
See Also
EntityTypeConfiguration<TEntityType> Class
System.Web.OData.Builder Namespace
Return to top