ReferenceNavigationBuilder ReferenceNavigationBuilder Class

Definition

Provides a simple API for configuring a relationship where configuration began on an end of the relationship with a reference that points to an instance of another entity type.

Instances of this class are returned from methods when using the ModelBuilder API and it is not designed to be directly constructed in your application code.

public class ReferenceNavigationBuilder : IInfrastructure<InternalRelationshipBuilder>
Public Class ReferenceNavigationBuilder
    Implements IInfrastructure(Of InternalRelationshipBuilder)
Inheritance
System.ObjectSystem.Object
ReferenceNavigationBuilderReferenceNavigationBuilder
Implements

Inherited Members

System.Object

System.Object.ToString()System.Object.ToString()
System.Object.Equals(System.Object)System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()System.Object.GetHashCode()
System.Object.GetType()System.Object.GetType()
System.Object.MemberwiseClone()System.Object.MemberwiseClone()

Constructors

ReferenceNavigationBuilder(EntityType, EntityType, PropertyInfo, InternalRelationshipBuilder) ReferenceNavigationBuilder(EntityType, EntityType, PropertyInfo, InternalRelationshipBuilder)

This API supports the Entity Framework Core infrastructure and is not intended to be used directly from your code. This API may change or be removed in future releases.

public ReferenceNavigationBuilder(EntityType declaringEntityType, EntityType relatedEntityType, PropertyInfo navigationProperty, InternalRelationshipBuilder builder)
Public Sub New(declaringEntityType As EntityType, relatedEntityType As EntityType, navigationProperty As PropertyInfo, builder As InternalRelationshipBuilder)
Parameters
declaringEntityType
EntityType EntityType
relatedEntityType
EntityType EntityType
navigationProperty
System.Reflection.PropertyInfo System.Reflection.PropertyInfo

ReferenceNavigationBuilder(EntityType, EntityType, String, InternalRelationshipBuilder) ReferenceNavigationBuilder(EntityType, EntityType, String, InternalRelationshipBuilder)

This API supports the Entity Framework Core infrastructure and is not intended to be used directly from your code. This API may change or be removed in future releases.

public ReferenceNavigationBuilder(EntityType declaringEntityType, EntityType relatedEntityType, string navigationName, InternalRelationshipBuilder builder)
Public Sub New(declaringEntityType As EntityType, relatedEntityType As EntityType, navigationName As String, builder As InternalRelationshipBuilder)
Parameters
declaringEntityType
EntityType EntityType
relatedEntityType
EntityType EntityType
navigationName
System.String System.String

Properties

DeclaringEntityType DeclaringEntityType

This API supports the Entity Framework Core infrastructure and is not intended to be used directly from your code. This API may change or be removed in future releases.

protected virtual EntityType DeclaringEntityType { get; }
Protected Overridable ReadOnly Property DeclaringEntityType As EntityType

ReferenceName ReferenceName

This API supports the Entity Framework Core infrastructure and is not intended to be used directly from your code. This API may change or be removed in future releases.

protected virtual string ReferenceName { get; }
Protected Overridable ReadOnly Property ReferenceName As String
Value
System.String System.String

ReferenceProperty ReferenceProperty

This API supports the Entity Framework Core infrastructure and is not intended to be used directly from your code. This API may change or be removed in future releases.

protected virtual PropertyInfo ReferenceProperty { get; }
Protected Overridable ReadOnly Property ReferenceProperty As PropertyInfo
Value
System.Reflection.PropertyInfo System.Reflection.PropertyInfo

RelatedEntityType RelatedEntityType

This API supports the Entity Framework Core infrastructure and is not intended to be used directly from your code. This API may change or be removed in future releases.

protected virtual EntityType RelatedEntityType { get; }
Protected Overridable ReadOnly Property RelatedEntityType As EntityType

Methods

WithMany(String) WithMany(String)

Configures this as a one-to-many relationship.

public virtual ReferenceCollectionBuilder WithMany(string collection = null)
Public Overridable Function WithMany(collection As String = Nothing) As ReferenceCollectionBuilder
Parameters
collection
System.String System.String

The name of the collection navigation property on the other end of this relationship. If null, there is no navigation property on the other end of the relationship.

Returns

An object to further configure the relationship.

WithManyBuilder(PropertyInfo) WithManyBuilder(PropertyInfo)

This API supports the Entity Framework Core infrastructure and is not intended to be used directly from your code. This API may change or be removed in future releases.

protected virtual InternalRelationshipBuilder WithManyBuilder(PropertyInfo navigationProperty)
Protected Overridable Function WithManyBuilder(navigationProperty As PropertyInfo) As InternalRelationshipBuilder
Parameters
navigationProperty
System.Reflection.PropertyInfo System.Reflection.PropertyInfo
Returns

WithManyBuilder(String) WithManyBuilder(String)

This API supports the Entity Framework Core infrastructure and is not intended to be used directly from your code. This API may change or be removed in future releases.

protected virtual InternalRelationshipBuilder WithManyBuilder(string navigationName)
Protected Overridable Function WithManyBuilder(navigationName As String) As InternalRelationshipBuilder
Parameters
navigationName
System.String System.String
Returns

WithOne(String) WithOne(String)

Configures this as a one-to-one relationship.

public virtual ReferenceReferenceBuilder WithOne(string reference = null)
Public Overridable Function WithOne(reference As String = Nothing) As ReferenceReferenceBuilder
Parameters
reference
System.String System.String

The name of the reference navigation property on the other end of this relationship. If null, there is no navigation property on the other end of the relationship.

Returns

An object to further configure the relationship.

WithOneBuilder(PropertyInfo) WithOneBuilder(PropertyInfo)

This API supports the Entity Framework Core infrastructure and is not intended to be used directly from your code. This API may change or be removed in future releases.

protected virtual InternalRelationshipBuilder WithOneBuilder(PropertyInfo navigationProperty)
Protected Overridable Function WithOneBuilder(navigationProperty As PropertyInfo) As InternalRelationshipBuilder
Parameters
navigationProperty
System.Reflection.PropertyInfo System.Reflection.PropertyInfo
Returns

WithOneBuilder(String) WithOneBuilder(String)

This API supports the Entity Framework Core infrastructure and is not intended to be used directly from your code. This API may change or be removed in future releases.

protected virtual InternalRelationshipBuilder WithOneBuilder(string navigationName)
Protected Overridable Function WithOneBuilder(navigationName As String) As InternalRelationshipBuilder
Parameters
navigationName
System.String System.String
Returns

Explicit Interface Implementations

IInfrastructure.Instance Microsoft.EntityFrameworkCore.Infrastructure.IInfrastructure.Instance

Gets the internal builder being used to configure the relationship.

InternalRelationshipBuilder IInfrastructure<InternalRelationshipBuilder>.Instance { get; }
ReadOnly WriteOnly Property Microsoft.EntityFrameworkCore.Infrastructure.IInfrastructure<Microsoft.EntityFrameworkCore.Metadata.Internal.InternalRelationshipBuilder>.Instance As InternalRelationshipBuilder Implements IInfrastructure(Of InternalRelationshipBuilder).Instance
Returns