Share via


StructuralTypeConfiguration<TStructuralType>.ContainsRequired<TTargetEntity> Method

Definition

Configures a required relationship from this structural type to a single contained navigation property.

public Microsoft.AspNet.OData.Builder.NavigationPropertyConfiguration ContainsRequired<TTargetEntity> (System.Linq.Expressions.Expression<Func<TStructuralType,TTargetEntity>> navigationPropertyExpression) where TTargetEntity : class;
member this.ContainsRequired : System.Linq.Expressions.Expression<Func<'StructuralType, 'argetEntity>> -> Microsoft.AspNet.OData.Builder.NavigationPropertyConfiguration (requires 'argetEntity : null)
Public Function ContainsRequired(Of TTargetEntity As Class) (navigationPropertyExpression As Expression(Of Func(Of TStructuralType, TTargetEntity))) As NavigationPropertyConfiguration

Type Parameters

TTargetEntity

The type of the entity at the other end of the relationship.

Parameters

navigationPropertyExpression
Expression<Func<TStructuralType,TTargetEntity>>

A lambda expression representing the navigation property for the relationship. For example, in C# t => t.MyProperty and in Visual Basic .NET Function(t) t.MyProperty.

Returns

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

Applies to