RequiredNavigationPropertyConfiguration<TEntityType,TTargetEntityType>.WithMany 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
WithMany() |
将关系配置为 required:many,且在关系的另一端无导航属性。 |
WithMany(Expression<Func<TTargetEntityType,ICollection<TEntityType>>>) |
将关系配置为 required:many,且在关系的另一端有导航属性。 |
WithMany()
将关系配置为 required: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>>>)
将关系配置为 required: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", "CA1006:DoNotNestGenericTypesInMemberSignatures")]
[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);
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: Function (t) t.MyProperty
返回
DependentNavigationPropertyConfiguration<TEntityType>
一个配置对象,可用于进一步配置关系。
- 属性