Export (0) Print
Expand All

EntityTypeConfiguration<TEntityType>.HasMany<TTargetEntity> Method

Entity Framework 5.0

Configures a many relationship from this entity type.

Namespace:  System.Data.Entity.ModelConfiguration
Assembly:  EntityFramework (in EntityFramework.dll)

public ManyNavigationPropertyConfiguration<TEntityType, TTargetEntity> HasMany<TTargetEntity>(
	Expression<Func<TEntityType, ICollection<TTargetEntity>>> navigationPropertyExpression
where TTargetEntity : class

Type Parameters


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


Type: System.Linq.Expressions.Expression<Func<TEntityType, ICollection<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.Data.Entity.ModelConfiguration.Configuration.ManyNavigationPropertyConfiguration<TEntityType, TTargetEntity>
A configuration object that can be used to further configure the relationship.
© 2014 Microsoft