Table of Contents

Class RelationshipBuilderBase

Namespace
Microsoft.EntityFrameworkCore.Metadata.Builders
Assembly
Microsoft.EntityFrameworkCore.dll

Base class used for configuring a relationship.

public abstract class RelationshipBuilderBase : IInfrastructure<IConventionForeignKeyBuilder>
Inheritance
RelationshipBuilderBase
Implements
Derived
Inherited Members
Extension Methods

Remarks

See Modeling entity types and relationships for more information and examples.

Constructors

RelationshipBuilderBase(IMutableEntityType, IMutableEntityType, IMutableForeignKey)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

[EntityFrameworkInternal]
protected RelationshipBuilderBase(IMutableEntityType principalEntityType, IMutableEntityType dependentEntityType, IMutableForeignKey foreignKey)

Parameters

principalEntityType IMutableEntityType
dependentEntityType IMutableEntityType
foreignKey IMutableForeignKey

RelationshipBuilderBase(InternalForeignKeyBuilder, RelationshipBuilderBase, bool, bool, bool)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

[EntityFrameworkInternal]
protected RelationshipBuilderBase(InternalForeignKeyBuilder builder, RelationshipBuilderBase oldBuilder, bool foreignKeySet = false, bool principalKeySet = false, bool requiredSet = false)

Parameters

builder InternalForeignKeyBuilder
oldBuilder RelationshipBuilderBase
foreignKeySet bool
principalKeySet bool
requiredSet bool

Properties

Builder

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

[EntityFrameworkInternal]
protected virtual InternalForeignKeyBuilder Builder { get; set; }

Property Value

InternalForeignKeyBuilder

DependentEntityType

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

[EntityFrameworkInternal]
protected virtual IMutableEntityType DependentEntityType { get; }

Property Value

IMutableEntityType

Metadata

The foreign key that represents this relationship.

public virtual IMutableForeignKey Metadata { get; }

Property Value

IMutableForeignKey

PrincipalEntityType

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

[EntityFrameworkInternal]
protected virtual IMutableEntityType PrincipalEntityType { get; }

Property Value

IMutableEntityType