ManyNavigationPropertyConfiguration<TEntityType, TTargetEntityType>.WithRequired Method
Configures the relationship to be many:required without a navigation property on the other side of the relationship.
Assembly: EntityFramework (in EntityFramework.dll)
Name | Description | |
---|---|---|
![]() | WithRequired() | Configures the relationship to be many:required without a navigation property on the other side of the relationship. |
![]() | WithRequired(Expression<Func<TTargetEntityType, TEntityType>>) | Configures the relationship to be many:required with a navigation property on the other side of the relationship. |
ManyNavigationPropertyConfiguration<TEntityType, TTargetEntityType>.WithRequired Method ()
Configures the relationship to be many:required without a navigation property on the other side of the relationship.
Return Value
Type: System.Data.Entity.ModelConfiguration.Configuration.DependentNavigationPropertyConfiguration<TTargetEntityType>A configuration object that can be used to further configure the relationship.
ManyNavigationPropertyConfiguration<TEntityType, TTargetEntityType>.WithRequired Method (Expression<Func<TTargetEntityType, TEntityType>>)
Configures the relationship to be many:required with a navigation property on the other side of the relationship.
[SuppressMessageAttribute("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters")] [SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")] public DependentNavigationPropertyConfiguration<TTargetEntityType> WithRequired( Expression<Func<TTargetEntityType, TEntityType>> navigationPropertyExpression )
Parameters
- navigationPropertyExpression
-
Type:
System.Linq.Expressions.Expression<Func<TTargetEntityType, 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<TTargetEntityType>A configuration object that can be used to further configure the relationship.