Share via


StructuralTypeConfiguration<TStructuralType>.ContainsOptional<TTargetEntity> Method

Definition

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

public Microsoft.AspNet.OData.Builder.NavigationPropertyConfiguration ContainsOptional<TTargetEntity> (System.Linq.Expressions.Expression<Func<TStructuralType,TTargetEntity>> navigationPropertyExpression) where TTargetEntity : class;
member this.ContainsOptional : System.Linq.Expressions.Expression<Func<'StructuralType, 'argetEntity>> -> Microsoft.AspNet.OData.Builder.NavigationPropertyConfiguration (requires 'argetEntity : null)
Public Function ContainsOptional(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