RequiredNavigationPropertyConfiguration<TEntityType, TTargetEntityType>.WithRequiredPrincipal Method
[This page is specific to the Entity Framework version 6. The latest version is available as the 'Entity Framework' NuGet package. For more information about Entity Framework, see msdn.com/data/ef.]
Configures the relationship to be required:required without a navigation property on the other side of the relationship. The entity type being configured will be the principal in the relationship. The entity type that the relationship targets will be the dependent and contain a foreign key to the principal.
Namespace: System.Data.Entity.ModelConfiguration.Configuration
Assembly: EntityFramework (in EntityFramework.dll)
Syntax
'Declaration
Public Function WithRequiredPrincipal As ForeignKeyNavigationPropertyConfiguration
'Usage
Dim instance As RequiredNavigationPropertyConfiguration
Dim returnValue As ForeignKeyNavigationPropertyConfiguration
returnValue = instance.WithRequiredPrincipal()
public ForeignKeyNavigationPropertyConfiguration WithRequiredPrincipal()
public:
ForeignKeyNavigationPropertyConfiguration^ WithRequiredPrincipal()
member WithRequiredPrincipal : unit -> ForeignKeyNavigationPropertyConfiguration
public function WithRequiredPrincipal() : ForeignKeyNavigationPropertyConfiguration
Return Value
Type: System.Data.Entity.ModelConfiguration.Configuration.ForeignKeyNavigationPropertyConfiguration
A configuration object that can be used to further configure the relationship.
See Also
Reference
RequiredNavigationPropertyConfiguration<TEntityType, TTargetEntityType> Class
WithRequiredPrincipal Overload
System.Data.Entity.ModelConfiguration.Configuration Namespace