Share via


IConventionRelationshipBuilder Interface

Definition

Provides a simple API surface for configuring an IConventionForeignKey from conventions.

This interface is typically used by database providers (and other extensions). It is generally not used in application code.

public interface IConventionRelationshipBuilder : Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionAnnotatableBuilder
type IConventionRelationshipBuilder = interface
    interface IConventionAnnotatableBuilder
Public Interface IConventionRelationshipBuilder
Implements IConventionAnnotatableBuilder
Implements

Properties

Metadata

The foreign key being configured.

ModelBuilder

Gets the model builder.

(Inherited from IConventionAnnotatableBuilder)

Methods

CanInvert(IReadOnlyList<IConventionProperty>, Boolean)

Returns a value indicating whether the principal and dependent entity types can be switched from the current configuration source

CanRemoveAnnotation(String, Boolean)

Returns a value indicating whether an annotation with the given name can be removed using this configuration source.

(Inherited from IConventionAnnotatableBuilder)
CanSetAnnotation(String, Object, Boolean)

Returns a value indicating whether an annotation with the given name and value can be set from this configuration source.

(Inherited from IConventionAnnotatableBuilder)
CanSetField(FieldInfo, Boolean, Boolean)

Returns a value indicating whether the backing field can be set for a navigation from the current configuration source.

CanSetField(String, Boolean, Boolean)

Returns a value indicating whether the backing field can be set for a navigation from the current configuration source.

CanSetForeignKey(IReadOnlyList<IConventionProperty>, Boolean)

Returns a value indicating whether the given properties can be set as the foreign key for this relationship from the current configuration source.

CanSetForeignKey(IReadOnlyList<String>, Boolean)

Returns a value indicating whether the given properties can be set as the foreign key for this relationship from the current configuration source.

CanSetIsEagerLoaded(Nullable<Boolean>, Boolean, Boolean)

Returns a value indicating whether this navigation can be configured as should be eager loaded by default from the current configuration source.

CanSetIsOwnership(Nullable<Boolean>, Boolean)

Returns a value indicating whether this relationship can be configured as defining an ownership or not from the current configuration source.

CanSetIsRequired(Nullable<Boolean>, Boolean)

Returns a value indicating whether this relationship requiredness can be configured from the current configuration source.

CanSetIsUnique(Nullable<Boolean>, Boolean)

Returns a value indicating whether this relationship uniqueness can be configured from the current configuration source.

CanSetNavigation(MemberInfo, Boolean, Boolean)

Returns a value indicating whether the given property can be used as a navigation for this relationship from the current configuration source.

CanSetNavigation(String, Boolean, Boolean)

Returns a value indicating whether the property with the given name can be used as a navigation for this relationship from the current configuration source.

CanSetNavigations(MemberInfo, MemberInfo, Boolean)

Returns a value indicating whether the given properties can be used as the navigation properties for this relationship from the current configuration source

CanSetNavigations(String, String, Boolean)

Returns a value indicating whether the properties with the given names can be used as the navigation properties for this relationship from the current configuration source

CanSetOnDelete(Nullable<DeleteBehavior>, Boolean)

Returns a value indicating whether the operation on principal deletion can be configured from the current configuration source.

CanSetPrincipalKey(IReadOnlyList<IConventionProperty>, Boolean)

Returns a value indicating whether the given properties can be set as the target for this relationship from the current configuration source

CanSetPrincipalKey(IReadOnlyList<String>, Boolean)

Returns a value indicating whether the given properties can be set as the target for this relationship from the current configuration source

HasAnnotation(String, Object, Boolean)

Sets the annotation stored under the given name. Overwrites the existing annotation if an annotation with the specified name already exists with same or lower ConfigurationSource.

(Inherited from IConventionAnnotatableBuilder)
HasEntityTypes(IConventionEntityType, IConventionEntityType, Boolean)

Configures which entity types participate in this relationship. By calling this method the principal and dependent types can be switched or the relationship could be moved to a base type of one of the participating entity types.

HasField(FieldInfo, Boolean, Boolean)

Sets the backing field to use for a navigation.

HasField(String, Boolean, Boolean)

Sets the backing field to use for a navigation.

HasForeignKey(IReadOnlyList<IConventionProperty>, Boolean)

Configures the properties to use as the foreign key for this relationship.

HasForeignKey(IReadOnlyList<String>, Boolean)

Configures the properties to use as the foreign key for this relationship.

HasNavigation(MemberInfo, Boolean, Boolean)

Configures the given property as a navigation property used by this relationship.

HasNavigation(String, Boolean, Boolean)

Configures the property with the given name as a navigation property used by this relationship.

HasNavigations(MemberInfo, MemberInfo, Boolean)

Configures the given properties as the navigation properties used by this relationship.

HasNavigations(String, String, Boolean)

Configures the properties with the given names as the navigation properties used by this relationship.

HasNoAnnotation(String, Boolean)

Removes the annotation with the given name from this object.

(Inherited from IConventionAnnotatableBuilder)
HasNonNullAnnotation(String, Object, Boolean)

Sets the annotation stored under the given name. Overwrites the existing annotation if an annotation with the specified name already exists with same or lower ConfigurationSource. Removes the annotation if null value is specified.

(Inherited from IConventionAnnotatableBuilder)
HasPrincipalKey(IReadOnlyList<IConventionProperty>, Boolean)

Configures the properties that this relationship targets.

HasPrincipalKey(IReadOnlyList<String>, Boolean)

Configures the properties that this relationship targets.

IsEagerLoaded(Nullable<Boolean>, Boolean, Boolean)

Configures whether this navigation should be eager loaded by default.

IsOwnership(Nullable<Boolean>, Boolean)

Configures whether this relationship defines an ownership (i.e. whether the dependent entity must always be accessed via the navigation from the principal entity).

IsRequired(Nullable<Boolean>, Boolean)

Configures whether this is a required relationship (i.e. whether none the foreign key properties can be assigned null).

IsUnique(Nullable<Boolean>, Boolean)

Configures whether the dependent entity is unique (i.e. whether the navigation to the dependent entity type is not a collection).

OnDelete(Nullable<DeleteBehavior>, Boolean)

Configures the operation applied to dependent entities in the relationship when the principal is deleted or the relationship is severed.

RemoveAnnotation(String, Boolean)
Obsolete.

Removes the annotation with the given name from this object.

(Inherited from IConventionAnnotatableBuilder)
SetOrRemoveAnnotation(String, Object, Boolean)
Obsolete.

Sets or removes the annotation stored under the given name.

(Inherited from IConventionAnnotatableBuilder)

Extension Methods

CanSetConstraintName(IConventionRelationshipBuilder, String, Boolean)

Returns a value indicating whether the foreign key constraint name can be set for this relationship from the current configuration source

HasConstraintName(IConventionRelationshipBuilder, String, Boolean)

Configures the foreign key constraint name for this relationship when targeting a relational database.

Applies to