ReferenceNavigationBuilder.WithOne(String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Configures this as a one-to-one relationship.
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceReferenceBuilder WithOne (string reference = default);
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceReferenceBuilder WithOne (string? reference = default);
abstract member WithOne : string -> Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceReferenceBuilder
override this.WithOne : string -> Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceReferenceBuilder
Public Overridable Function WithOne (Optional reference As String = Nothing) As ReferenceReferenceBuilder
Parameters
- reference
- String
The name of the reference navigation property on the other end of this relationship. If null or not specified, there is no navigation property on the other end of the relationship.
Returns
An object that can be used to configure the relationship.
Remarks
Note that calling this method with no parameters will explicitly configure this side of the relationship to use no navigation property, even if such a property exists on the entity type. If the navigation property is to be used, then it must be specified.
Applies to
Entity Framework