RequiredNavigationPropertyConfiguration<TEntityType, TTargetEntityType>.WithRequiredDependent Method (Expression<Func<TTargetEntityType, TEntityType>>)

Entity Framework 5.0

Configures the relationship to be required:required with a navigation property on the other side of the relationship. The entity type being configured will be the dependent and contain a foreign key to the principal. The entity type that the relationship targets will be the principal in the relationship.

Namespace:  System.Data.Entity.ModelConfiguration.Configuration
Assembly:  EntityFramework (in EntityFramework.dll)

public ForeignKeyNavigationPropertyConfiguration WithRequiredDependent(
	Expression<Func<TTargetEntityType, TEntityType>> navigationPropertyExpression


Type: System.Linq.Expressions.Expression<Func<TTargetEntityType, TEntityType>>

A lambda expression representing the navigation property on the other end of the relationship. For example, in C# t => t.MyProperty and in Visual Basic .Net Function(t) t.MyProperty.

Return Value

Type: System.Data.Entity.ModelConfiguration.Configuration.ForeignKeyNavigationPropertyConfiguration
A configuration object that can be used to further configure the relationship.