Share via


RequiredNavigationPropertyConfiguration<TEntityType, TTargetEntityType>.WithOptional 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:optional without a navigation property on the other side of the relationship.

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

Syntax

'Declaration
Public Function WithOptional As ForeignKeyNavigationPropertyConfiguration
'Usage
Dim instance As RequiredNavigationPropertyConfiguration 
Dim returnValue As ForeignKeyNavigationPropertyConfiguration 

returnValue = instance.WithOptional()
public ForeignKeyNavigationPropertyConfiguration WithOptional()
public:
ForeignKeyNavigationPropertyConfiguration^ WithOptional()
member WithOptional : unit -> ForeignKeyNavigationPropertyConfiguration
public function WithOptional() : 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

WithOptional Overload

System.Data.Entity.ModelConfiguration.Configuration Namespace