EntityTypeConfiguration<TEntityType>.ContainsRequired<TTargetEntity> Method (Expression<Func<TEntityType, TTargetEntity>>)
Configures a required relationship from this entity type to a single contained navigation property.
Namespace: System.Web.OData.Builder
Assembly: System.Web.OData (in System.Web.OData.dll)
Syntax
public NavigationPropertyConfiguration ContainsRequired<TTargetEntity>(
Expression<Func<TEntityType, TTargetEntity>> navigationPropertyExpression
)
where TTargetEntity : class
public:
generic<typename TTargetEntity>
where TTargetEntity : ref class
NavigationPropertyConfiguration^ ContainsRequired(
Expression<Func<TEntityType, TTargetEntity>^>^ navigationPropertyExpression
)
member ContainsRequired<'TTargetEntity when 'TTargetEntity : not struct> :
navigationPropertyExpression:Expression<Func<'TEntityType, 'TTargetEntity>> -> NavigationPropertyConfiguration
Public Function ContainsRequired(Of TTargetEntity As Class) (
navigationPropertyExpression As Expression(Of Func(Of TEntityType, TTargetEntity))
) As NavigationPropertyConfiguration
Parameters
navigationPropertyExpression
Type: System.Linq.Expressions.Expression<Func<TEntityType, 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.
Return Value
Type: System.Web.OData.Builder.NavigationPropertyConfiguration
A configuration object that can be used to further configure the relationship.
Type Parameters
- TTargetEntity
The type of the entity at the other end of the relationship.
See Also
EntityTypeConfiguration<TEntityType> Class
System.Web.OData.Builder Namespace
Return to top