Udostępnij za pośrednictwem


OwnedNavigationBuilder Class

Definition

Provides a simple API for configuring a navigation to an owned entity type.

public class OwnedNavigationBuilder : Microsoft.EntityFrameworkCore.Infrastructure.IInfrastructure<Microsoft.EntityFrameworkCore.Metadata.Internal.InternalEntityTypeBuilder>
public class OwnedNavigationBuilder : Microsoft.EntityFrameworkCore.Infrastructure.IInfrastructure<Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionEntityTypeBuilder>
type OwnedNavigationBuilder = class
    interface IInfrastructure<InternalEntityTypeBuilder>
type OwnedNavigationBuilder = class
    interface IInfrastructure<IConventionEntityTypeBuilder>
Public Class OwnedNavigationBuilder
Implements IInfrastructure(Of InternalEntityTypeBuilder)
Public Class OwnedNavigationBuilder
Implements IInfrastructure(Of IConventionEntityTypeBuilder)
Inheritance
OwnedNavigationBuilder
Derived
Implements
IInfrastructure<Microsoft.EntityFrameworkCore.Metadata.Internal.InternalEntityTypeBuilder> IInfrastructure<IConventionEntityTypeBuilder>

Remarks

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

Constructors

OwnedNavigationBuilder(EntityType, EntityType, InternalRelationshipBuilder)

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.

OwnedNavigationBuilder(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.

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.

DependentEntityType

Gets the dependent entity type used to configure this relationship.

Metadata

The foreign key that represents this ownership.

OwnedEntityType

The owned entity type being configured.

PrincipalEntityType

Gets the principal entity type used to configure this relationship.

Methods

FindRelatedEntityType(String, String)

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.

FindRelatedEntityType(Type, String)

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.

HasAnnotation(String, Object)

Adds or updates an annotation on the owned entity type. If an annotation with the key specified in annotation already exists its value will be updated.

HasChangeTrackingStrategy(ChangeTrackingStrategy)

Configures the ChangeTrackingStrategy to be used for this entity type. This strategy indicates how the context detects changes to properties for an instance of the entity type.

HasData(IEnumerable<Object>)

Adds seed data to this entity type. It is used to generate data motion migrations.

HasData(Object[])

Adds seed data to this entity type. It is used to generate data motion migrations.

HasIndex(String[], String)

Configures an index on the specified properties and with the given name. If there is an existing index on the given list of properties and with the given name, then the existing index will be returned for configuration.

HasIndex(String[])

Configures an index on the specified properties. If there is an existing index on the given set of properties, then the existing index will be returned for configuration.

HasKey(String[])

Sets the properties that make up the primary key for this owned entity type.

HasOne(String, String)

Configures a relationship where this entity type has a reference that points to a single instance of the other type in the relationship.

HasOne(String)

Configures a relationship where this entity type has a reference that points to a single instance of the other type in the relationship.

HasOne(Type, String)

Configures a relationship where this entity type has a reference that points to a single instance of the other type in the relationship.

HasOneBuilder(MemberIdentity, EntityType)

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.

Ignore(String)

Excludes the given property from the entity type. This method is typically used to remove properties or navigations from the owned entity type that were added by convention.

IndexerProperty(Type, String)

Returns an object that can be used to configure a property of the entity type. If no property with the given name exists, then a new property will be added.

IndexerProperty<TProperty>(String)

Returns an object that can be used to configure a property of the entity type. If no property with the given name exists, then a new property will be added.

Navigation(String)

Returns an object that can be used to configure an existing navigation property from the owned type to its owner. It is an error for the navigation property not to exist.

OwnsMany(String, String, Action<OwnedNavigationBuilder>)

Configures a relationship where the target entity is owned by (or part of) this entity.

OwnsMany(String, String)

Configures a relationship where the target entity is owned by (or part of) this entity.

OwnsMany(String, Type, String, Action<OwnedNavigationBuilder>)

Configures a relationship where the target entity is owned by (or part of) this entity.

OwnsMany(String, Type, String)

Configures a relationship where the target entity is owned by (or part of) this entity.

OwnsMany(Type, String, Action<OwnedNavigationBuilder>)

Configures a relationship where the target entity is owned by (or part of) this entity.

OwnsMany(Type, String)

Configures a relationship where the target entity is owned by (or part of) this entity.

OwnsOne(String, String, Action<OwnedNavigationBuilder>)

Configures a relationship where the target entity is owned by (or part of) this entity. The target entity key value is always propagated from the entity it belongs to.

OwnsOne(String, String)

Configures a relationship where the target entity is owned by (or part of) this entity. The target entity key value is always propagated from the entity it belongs to.

OwnsOne(String, Type, String, Action<OwnedNavigationBuilder>)

Configures a relationship where the target entity is owned by (or part of) this entity. The target entity key value is always propagated from the entity it belongs to.

OwnsOne(String, Type, String)

Configures a relationship where the target entity is owned by (or part of) this entity. The target entity key value is always propagated from the entity it belongs to.

OwnsOne(Type, String, Action<OwnedNavigationBuilder>)

Configures a relationship where the target entity is owned by (or part of) this entity. The target entity key value is always propagated from the entity it belongs to.

OwnsOne(Type, String)

Configures a relationship where the target entity is owned by (or part of) this entity. The target entity key value is always propagated from the entity it belongs to.

PrimitiveCollection(String)

Returns an object that can be used to configure a property of the owned type where that property represents a collection of primitive values, such as strings or integers. If no property with the given name exists, then a new property will be added.

PrimitiveCollection(Type, String)

Returns an object that can be used to configure a property of the owned type where that property represents a collection of primitive values, such as strings or integers. If no property with the given name exists, then a new property will be added.

PrimitiveCollection<TProperty>(String)

Returns an object that can be used to configure a property of the owned type where that property represents a collection of primitive values, such as strings or integers. If no property with the given name exists, then a new property will be added.

Property(String)

Returns an object that can be used to configure a property of the owned entity type. If no property with the given name exists, then a new property will be added.

Property(Type, String)

Returns an object that can be used to configure a property of the owned entity type. If no property with the given name exists, then a new property will be added.

Property<TProperty>(String)

Returns an object that can be used to configure a property of the owned entity type. If no property with the given name exists, then a new property will be added.

UpdateBuilder<T>(Func<T>)

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.

UsePropertyAccessMode(PropertyAccessMode)

Sets the PropertyAccessMode to use for all properties of this entity type.

WithOwner(String)

Configures the relationship to the owner.

Explicit Interface Implementations

IInfrastructure<IConventionEntityTypeBuilder>.Instance

Gets the internal builder being used to configure the owned entity type.

IInfrastructure<InternalEntityTypeBuilder>.Instance

Gets the internal builder being used to configure the owned entity type.

Extension Methods

ToJsonProperty(OwnedNavigationBuilder, String)

Configures the property name that the entity is mapped to when stored as an embedded document.

GetInfrastructure<T>(IInfrastructure<T>)

Gets the value from a property that is being hidden using IInfrastructure<T>.

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

DeleteUsingStoredProcedure(OwnedNavigationBuilder, Action<OwnedNavigationStoredProcedureBuilder>)

Configures the stored procedure that the entity type uses for deletes when targeting a relational database.

DeleteUsingStoredProcedure(OwnedNavigationBuilder, String, Action<OwnedNavigationStoredProcedureBuilder>)

Configures the stored procedure that the entity type uses for deletes when targeting a relational database.

DeleteUsingStoredProcedure(OwnedNavigationBuilder, String, String, Action<OwnedNavigationStoredProcedureBuilder>)

Configures the stored procedure that the entity type uses for deletes when targeting a relational database.

HasCheckConstraint(OwnedNavigationBuilder, String, String, Action<CheckConstraintBuilder>)
Obsolete.

Configures a database check constraint when targeting a relational database.

HasCheckConstraint(OwnedNavigationBuilder, String, String)
Obsolete.

Configures a database check constraint when targeting a relational database.

InsertUsingStoredProcedure(OwnedNavigationBuilder, Action<OwnedNavigationStoredProcedureBuilder>)

Configures the stored procedure that the entity type uses for inserts when targeting a relational database.

InsertUsingStoredProcedure(OwnedNavigationBuilder, String, Action<OwnedNavigationStoredProcedureBuilder>)

Configures the stored procedure that the entity type uses for inserts when targeting a relational database.

InsertUsingStoredProcedure(OwnedNavigationBuilder, String, String, Action<OwnedNavigationStoredProcedureBuilder>)

Configures the stored procedure that the entity type uses for inserts when targeting a relational database.

SplitToTable(OwnedNavigationBuilder, String, Action<OwnedNavigationSplitTableBuilder>)

Configures some of the properties on this entity type to be mapped to a different table. The primary key properties are mapped to all tables, other properties must be explicitly mapped.

SplitToTable(OwnedNavigationBuilder, String, String, Action<OwnedNavigationSplitTableBuilder>)

Configures some of the properties on this entity type to be mapped to a different table. The primary key properties are mapped to all tables, other properties must be explicitly mapped.

SplitToView(OwnedNavigationBuilder, String, Action<OwnedNavigationSplitViewBuilder>)

Configures some of the properties on this entity type to be mapped to a different view. The primary key properties are mapped to all views, other properties must be explicitly mapped.

SplitToView(OwnedNavigationBuilder, String, String, Action<OwnedNavigationSplitViewBuilder>)

Configures some of the properties on this entity type to be mapped to a different view. The primary key properties are mapped to all views, other properties must be explicitly mapped.

ToFunction(OwnedNavigationBuilder, MethodInfo, Action<OwnedNavigationTableValuedFunctionBuilder>)

Configures the function that the entity type maps to when targeting a relational database.

ToFunction(OwnedNavigationBuilder, MethodInfo, Action<TableValuedFunctionBuilder>)

Configures the function that the entity type maps to when targeting a relational database.

ToFunction(OwnedNavigationBuilder, MethodInfo)

Configures the function that the entity type maps to when targeting a relational database.

ToFunction(OwnedNavigationBuilder, String, Action<OwnedNavigationTableValuedFunctionBuilder>)

Configures the function that the entity type maps to when targeting a relational database.

ToFunction(OwnedNavigationBuilder, String, Action<TableValuedFunctionBuilder>)

Configures the function that the entity type maps to when targeting a relational database.

ToFunction(OwnedNavigationBuilder, String)

Configures the function that the entity type maps to when targeting a relational database.

ToTable(OwnedNavigationBuilder, Action<OwnedNavigationTableBuilder>)

Configures the table that the entity type maps to when targeting a relational database.

ToTable(OwnedNavigationBuilder, Action<TableBuilder>)

Configures the table that the entity type maps to when targeting a relational database.

ToTable(OwnedNavigationBuilder, String, Action<OwnedNavigationTableBuilder>)

Configures the table that the entity type maps to when targeting a relational database.

ToTable(OwnedNavigationBuilder, String, Action<TableBuilder>)

Configures the table that the entity type maps to when targeting a relational database.

ToTable(OwnedNavigationBuilder, String, Boolean)
Obsolete.

Configures the table that the entity type maps to when targeting a relational database.

ToTable(OwnedNavigationBuilder, String, String, Action<OwnedNavigationTableBuilder>)

Configures the table that the entity type maps to when targeting a relational database.

ToTable(OwnedNavigationBuilder, String, String, Action<TableBuilder>)

Configures the table that the entity type maps to when targeting a relational database.

ToTable(OwnedNavigationBuilder, String, String, Boolean)
Obsolete.

Configures the table that the entity type maps to when targeting a relational database.

ToTable(OwnedNavigationBuilder, String, String)

Configures the table that the entity type maps to when targeting a relational database.

ToTable(OwnedNavigationBuilder, String)

Configures the table that the entity type maps to when targeting a relational database.

ToView(OwnedNavigationBuilder, String, Action<OwnedNavigationViewBuilder>)

Configures the view that the entity type maps to when targeting a relational database.

ToView(OwnedNavigationBuilder, String, String, Action<OwnedNavigationViewBuilder>)

Configures the view that the entity type maps to when targeting a relational database.

ToView(OwnedNavigationBuilder, String, String)

Configures the view that the entity type maps to when targeting a relational database.

ToView(OwnedNavigationBuilder, String)

Configures the view that the entity type maps to when targeting a relational database.

UpdateUsingStoredProcedure(OwnedNavigationBuilder, Action<OwnedNavigationStoredProcedureBuilder>)

Configures the stored procedure that the entity type uses for updates when targeting a relational database.

UpdateUsingStoredProcedure(OwnedNavigationBuilder, String, Action<OwnedNavigationStoredProcedureBuilder>)

Configures the stored procedure that the entity type uses for updates when targeting a relational database.

UpdateUsingStoredProcedure(OwnedNavigationBuilder, String, String, Action<OwnedNavigationStoredProcedureBuilder>)

Configures the stored procedure that the entity type uses for updates when targeting a relational database.

HasCheckConstraint(OwnedNavigationBuilder, String, String)

Configures a database check constraint when targeting a relational database.

HasColumnType(OwnedNavigationBuilder, String)

Set the relational database column type to be used to store the document represented by this owned entity.

HasJsonPropertyName(OwnedNavigationBuilder, String)

Configures the navigation of an entity mapped to a JSON column, mapping the navigation to a specific JSON property, rather than using the navigation name.

ToJson(OwnedNavigationBuilder, String)

Configures a relationship where this entity type and the entities that it owns are mapped to a JSON column in the database.

ToJson(OwnedNavigationBuilder)

Configures a relationship where this entity type and the entities that it owns are mapped to a JSON column in the database.

ForSqlServerIsMemoryOptimized(OwnedNavigationBuilder, Boolean)
Obsolete.

Configures the table that the entity maps to when targeting SQL Server as memory-optimized.

IsMemoryOptimized(OwnedNavigationBuilder, Boolean)
Obsolete.

Configures the table that the entity maps to when targeting SQL Server as memory-optimized.

Applies to