Sprache

EntityTypeConfiguration<TEntityType>.HasMany<TTargetEntity> Methode

Definition

Konfiguriert eine viele Beziehung aus diesem Entitätstyp.

[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)

Typparameter

TTargetEntity

Der Typ der Entität am anderen Ende der Beziehung.

Parameter

navigationPropertyExpression
Expression<Func<TEntityType,ICollection<TTargetEntity>>>

Ein Lambda-Ausdruck, der die Navigationseigenschaft für die Beziehung darstellt. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty

Gibt zurück

ManyNavigationPropertyConfiguration<TEntityType,TTargetEntity>

Ein Konfigurationsobjekt, das verwendet werden kann, um die Beziehung weiter zu konfigurieren.

Attribute

Gilt für: