Share via


ManyNavigationPropertyConfiguration<TEntityType,TTargetEntityType>.WithRequired Method

Definition

Overloads

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.

WithRequired()

Configures the relationship to be many:required without a navigation property on the other side of the relationship.

public System.Data.Entity.ModelConfiguration.Configuration.DependentNavigationPropertyConfiguration<TTargetEntityType> WithRequired ();
member this.WithRequired : unit -> System.Data.Entity.ModelConfiguration.Configuration.DependentNavigationPropertyConfiguration<'argetEntityType (requires 'argetEntityType : null)>
Public Function WithRequired () As DependentNavigationPropertyConfiguration(Of TTargetEntityType)

Returns

A configuration object that can be used to further configure the relationship.

Applies to

WithRequired(Expression<Func<TTargetEntityType,TEntityType>>)

Configures the relationship to be many:required with a navigation property on the other side of the relationship.

[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters")]
public System.Data.Entity.ModelConfiguration.Configuration.DependentNavigationPropertyConfiguration<TTargetEntityType> WithRequired (System.Linq.Expressions.Expression<Func<TTargetEntityType,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<TTargetEntityType> WithRequired (System.Linq.Expressions.Expression<Func<TTargetEntityType,TEntityType>> navigationPropertyExpression);
member this.WithRequired : System.Linq.Expressions.Expression<Func<'argetEntityType, 'EntityType>> -> System.Data.Entity.ModelConfiguration.Configuration.DependentNavigationPropertyConfiguration<'argetEntityType (requires 'argetEntityType : null)>
Public Function WithRequired (navigationPropertyExpression As Expression(Of Func(Of TTargetEntityType, TEntityType))) As DependentNavigationPropertyConfiguration(Of TTargetEntityType)

Parameters

navigationPropertyExpression
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

Returns

A configuration object that can be used to further configure the relationship.

Attributes

Applies to