OptionalNavigationPropertyConfiguration<TEntityType,TTargetEntityType>.WithMany 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
WithMany() |
將關聯性設定為 optional:many,而且在關聯性的另一端沒有導覽屬性。 |
WithMany(Expression<Func<TTargetEntityType,ICollection<TEntityType>>>) |
將關聯性設定為 optional:many,而且在關聯性的另一端有導覽屬性。 |
WithMany()
將關聯性設定為 optional:many,而且在關聯性的另一端沒有導覽屬性。
public System.Data.Entity.ModelConfiguration.Configuration.DependentNavigationPropertyConfiguration<TEntityType> WithMany ();
member this.WithMany : unit -> System.Data.Entity.ModelConfiguration.Configuration.DependentNavigationPropertyConfiguration<'EntityType (requires 'EntityType : null)>
Public Function WithMany () As DependentNavigationPropertyConfiguration(Of TEntityType)
傳回
DependentNavigationPropertyConfiguration<TEntityType>
可用來進一步設定關係的設定物件。
適用於
WithMany(Expression<Func<TTargetEntityType,ICollection<TEntityType>>>)
將關聯性設定為 optional:many,而且在關聯性的另一端有導覽屬性。
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters")]
public System.Data.Entity.ModelConfiguration.Configuration.DependentNavigationPropertyConfiguration<TEntityType> WithMany (System.Linq.Expressions.Expression<Func<TTargetEntityType,System.Collections.Generic.ICollection<TEntityType>>> navigationPropertyExpression);
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")]
public System.Data.Entity.ModelConfiguration.Configuration.DependentNavigationPropertyConfiguration<TEntityType> WithMany (System.Linq.Expressions.Expression<Func<TTargetEntityType,System.Collections.Generic.ICollection<TEntityType>>> navigationPropertyExpression);
member this.WithMany : System.Linq.Expressions.Expression<Func<'argetEntityType, System.Collections.Generic.ICollection<'EntityType>>> -> System.Data.Entity.ModelConfiguration.Configuration.DependentNavigationPropertyConfiguration<'EntityType (requires 'EntityType : null)>
Public Function WithMany (navigationPropertyExpression As Expression(Of Func(Of TTargetEntityType, ICollection(Of TEntityType)))) As DependentNavigationPropertyConfiguration(Of TEntityType)
參數
- navigationPropertyExpression
- Expression<Func<TTargetEntityType,ICollection<TEntityType>>>
Lambda 運算式,表示關聯性另一端的導覽屬性。 C#: t = > t.MyProperty VB.Net:函式 (t) t.MyProperty
傳回
DependentNavigationPropertyConfiguration<TEntityType>
可用來進一步設定關係的設定物件。
- 屬性