EntityTypeConfiguration<TEntityType>.HasMany<TTargetEntity> Method (Expression<Func<TEntityType, ICollection<TTargetEntity>>>)
Configures a many relationship from this entity type.
Assembly: EntityFramework (in EntityFramework.dll)
[SuppressMessageAttribute("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters")] [SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")] public ManyNavigationPropertyConfiguration<TEntityType, TTargetEntity> HasMany<TTargetEntity>( Expression<Func<TEntityType, ICollection<TTargetEntity>>> navigationPropertyExpression ) where TTargetEntity : class
Parameters
- navigationPropertyExpression
-
Type:
System.Linq.Expressions.Expression<Func<TEntityType, ICollection<TTargetEntity>>>
A lambda expression representing the navigation property for the relationship. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
Return Value
Type: System.Data.Entity.ModelConfiguration.Configuration.ManyNavigationPropertyConfiguration<TEntityType, TTargetEntity>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.