EntityTypeConfiguration<TEntityType>.HasMany<TTargetEntity> Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Configures a many relationship from this entity type.
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters")]
public System.Data.Entity.ModelConfiguration.Configuration.ManyNavigationPropertyConfiguration<TEntityType,TTargetEntity> HasMany<TTargetEntity> (System.Linq.Expressions.Expression<Func<TEntityType,System.Collections.Generic.ICollection<TTargetEntity>>> navigationPropertyExpression) where TTargetEntity : class;
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")]
public System.Data.Entity.ModelConfiguration.Configuration.ManyNavigationPropertyConfiguration<TEntityType,TTargetEntity> HasMany<TTargetEntity> (System.Linq.Expressions.Expression<Func<TEntityType,System.Collections.Generic.ICollection<TTargetEntity>>> navigationPropertyExpression) where TTargetEntity : class;
member this.HasMany : System.Linq.Expressions.Expression<Func<'EntityType, System.Collections.Generic.ICollection<'argetEntity>>> -> System.Data.Entity.ModelConfiguration.Configuration.ManyNavigationPropertyConfiguration<'EntityType, 'argetEntity (requires 'EntityType : null and 'argetEntity : null)> (requires 'argetEntity : null)
Public Function HasMany(Of TTargetEntity As Class) (navigationPropertyExpression As Expression(Of Func(Of TEntityType, ICollection(Of TTargetEntity)))) As ManyNavigationPropertyConfiguration(Of TEntityType, TTargetEntity)
Type Parameters
- TTargetEntity
The type of the entity at the other end of the relationship.
Parameters
- navigationPropertyExpression
- 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
Returns
ManyNavigationPropertyConfiguration<TEntityType,TTargetEntity>
A configuration object that can be used to further configure the relationship.
- Attributes
Applies to
Met ons samenwerken op GitHub
De bron voor deze inhoud vindt u op GitHub, waar u ook problemen en pull-aanvragen kunt maken en controleren. Bekijk onze gids voor inzenders voor meer informatie.
Entity Framework