RequiredNavigationPropertyConfiguration<TEntityType, TTargetEntityType>.WithMany Method
Configures the relationship to be required: many without a navigation property on the other side of the relationship.
Assembly: EntityFramework (in EntityFramework.dll)
Name | Description | |
---|---|---|
![]() | WithMany() | Configures the relationship to be required:many without a navigation property on the other side of the relationship. |
![]() | WithMany(Expression<Func<TTargetEntityType, ICollection<TEntityType>>>) | Configures the relationship to be required:many with a navigation property on the other side of the relationship. |
RequiredNavigationPropertyConfiguration<TEntityType, TTargetEntityType>.WithMany Method ()
Configures the relationship to be required:many without a navigation property on the other side of the relationship.
Return Value
Type: System.Data.Entity.ModelConfiguration.Configuration.DependentNavigationPropertyConfiguration<TEntityType>A configuration object that can be used to further configure the relationship.
RequiredNavigationPropertyConfiguration<TEntityType, TTargetEntityType>.WithMany Method (Expression<Func<TTargetEntityType, ICollection<TEntityType>>>)
Configures the relationship to be required:many with a navigation property on the other side of the relationship.
[SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")] [SuppressMessageAttribute("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters")] public DependentNavigationPropertyConfiguration<TEntityType> WithMany( Expression<Func<TTargetEntityType, ICollection<TEntityType>>> navigationPropertyExpression )
Parameters
- navigationPropertyExpression
-
Type:
System.Linq.Expressions.Expression<Func<TTargetEntityType, ICollection<TEntityType>>>
An lambda expression representing the navigation property on the other end of the relationship. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
Return Value
Type: System.Data.Entity.ModelConfiguration.Configuration.DependentNavigationPropertyConfiguration<TEntityType>A configuration object that can be used to further configure the relationship.