CollectionNavigationBuilder CollectionNavigationBuilder Class

Definition

Provides a simple API for configuring a relationship where configuration began on an end of the relationship with a collection that contains instances 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 CollectionNavigationBuilder : IInfrastructure<InternalRelationshipBuilder>
Public Class CollectionNavigationBuilder
    Implements IInfrastructure(Of InternalRelationshipBuilder)
Inheritance
System.ObjectSystem.Object
CollectionNavigationBuilderCollectionNavigationBuilder
Implements

Constructors

CollectionNavigationBuilder(EntityType, EntityType, PropertyInfo, InternalRelationshipBuilder) CollectionNavigationBuilder(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 CollectionNavigationBuilder(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

CollectionNavigationBuilder(EntityType, EntityType, String, InternalRelationshipBuilder) CollectionNavigationBuilder(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 CollectionNavigationBuilder(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

CollectionName CollectionName

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 CollectionName { get; }
Protected Overridable ReadOnly Property CollectionName As String
Value
System.String System.String

CollectionProperty CollectionProperty

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 CollectionProperty { get; }
Protected Overridable ReadOnly Property CollectionProperty As PropertyInfo
Value
System.Reflection.PropertyInfo System.Reflection.PropertyInfo

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

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

Equals(Object) Equals(Object)

Inherited from System.Object

Equals(Object, Object) Equals(Object, Object)

Inherited from System.Object

GetHashCode() GetHashCode()

Inherited from System.Object

GetType() GetType()

Inherited from System.Object

MemberwiseClone() MemberwiseClone()

Inherited from System.Object

ReferenceEquals(Object, Object) ReferenceEquals(Object, Object)

Inherited from System.Object

ToString() ToString()

Inherited from System.Object

WithOne(String) WithOne(String)

Configures this as a one-to-many relationship.

public virtual ReferenceCollectionBuilder WithOne(string navigationName = null)
Public Overridable Function WithOne(navigationName As String = Nothing) As ReferenceCollectionBuilder
Parameters
navigationName
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.

This property is intended for use by extension methods that need to make use of services not directly exposed in the public API surface.

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