OwnedNavigationBuilder<TOwnerEntity,TDependentEntity> Class

Definition

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

public class OwnedNavigationBuilder<TEntity,TDependentEntity> : Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder where TEntity : class where TDependentEntity : class
public class OwnedNavigationBuilder<TOwnerEntity,TDependentEntity> : Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder where TOwnerEntity : class where TDependentEntity : class
type OwnedNavigationBuilder<'Entity, 'DependentEntity (requires 'Entity : null and 'DependentEntity : null)> = class
    inherit OwnedNavigationBuilder
type OwnedNavigationBuilder<'OwnerEntity, 'DependentEntity (requires 'OwnerEntity : null and 'DependentEntity : null)> = class
    inherit OwnedNavigationBuilder
Public Class OwnedNavigationBuilder(Of TEntity, TDependentEntity)
Inherits OwnedNavigationBuilder
Public Class OwnedNavigationBuilder(Of TOwnerEntity, TDependentEntity)
Inherits OwnedNavigationBuilder

Type Parameters

TDependentEntity
TOwnerEntity
Inheritance
OwnedNavigationBuilder<TOwnerEntity,TDependentEntity>

Remarks

See Modeling entity types and relationships for more information.

Constructors

OwnedNavigationBuilder<TOwnerEntity,TDependentEntity>(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<TOwnerEntity,TDependentEntity>(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.

(Inherited from OwnedNavigationBuilder)
DependentEntityType

Gets the dependent entity type used to configure this relationship.

(Inherited from OwnedNavigationBuilder)
Metadata

The foreign key that represents this ownership.

(Inherited from OwnedNavigationBuilder)
OwnedEntityType

The owned entity type being configured.

(Inherited from OwnedNavigationBuilder)
PrincipalEntityType

Gets the principal entity type used to configure this relationship.

(Inherited from OwnedNavigationBuilder)

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.

(Inherited from OwnedNavigationBuilder)
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.

(Inherited from OwnedNavigationBuilder)
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>)

Configures this entity to have seed data. It is used to generate data motion migrations.

HasData(IEnumerable<Object>)

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

(Inherited from OwnedNavigationBuilder)
HasData(IEnumerable<TDependentEntity>)

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

HasData(Object[])

Configures this entity to have seed data. It is used to generate data motion migrations.

HasData(TDependentEntity[])

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

HasIndex(Expression<Func<TDependentEntity,Object>>)

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.

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.

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.

(Inherited from OwnedNavigationBuilder)
HasKey(Expression<Func<TDependentEntity,Object>>)

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

HasKey(String[])

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

HasKey(String[])

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

(Inherited from OwnedNavigationBuilder)
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.

Note that calling this method with no parameters will explicitly configure this side of the relationship to use no navigation property, even if such a property exists on the entity type. If the navigation property is to be used, then it must be specified.

After calling this method, you should chain a call to WithMany(String) or WithOne(String) to fully configure the relationship. Calling just this method without the chained call will not produce a valid relationship.

(Inherited from OwnedNavigationBuilder)
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.

Note that calling this method with no parameters will explicitly configure this side of the relationship to use no navigation property, even if such a property exists on the entity type. If the navigation property is to be used, then it must be specified.

After calling this method, you should chain a call to WithMany(String) or WithOne(String) to fully configure the relationship. Calling just this method without the chained call will not produce a valid relationship.

(Inherited from OwnedNavigationBuilder)
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.

Note that calling this method with no parameters will explicitly configure this side of the relationship to use no navigation property, even if such a property exists on the entity type. If the navigation property is to be used, then it must be specified.

After calling this method, you should chain a call to WithMany(String) or WithOne(String) to fully configure the relationship. Calling just this method without the chained call will not produce a valid relationship.

(Inherited from OwnedNavigationBuilder)
HasOne<TNewRelatedEntity>(Expression<Func<TDependentEntity,TNewRelatedEntity>>)

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

Note that calling this method with no parameters will explicitly configure this side of the relationship to use no navigation property, even if such a property exists on the entity type. If the navigation property is to be used, then it must be specified.

After calling this method, you should chain a call to WithMany(Expression<Func<TRelatedEntity,IEnumerable<TEntity>>>) or WithOne(Expression<Func<TRelatedEntity,TEntity>>) to fully configure the relationship. Calling just this method without the chained call will not produce a valid relationship.

HasOne<TNewRelatedEntity>(String)

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

Note that calling this method with no parameters will explicitly configure this side of the relationship to use no navigation property, even if such a property exists on the entity type. If the navigation property is to be used, then it must be specified.

After calling this method, you should chain a call to WithMany(String) or WithOne(String) to fully configure the relationship. Calling just this method without the chained call will not produce a valid relationship.

Ignore(Expression<Func<TDependentEntity,Object>>)

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.

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.

Indexer properties are stored in the entity using an indexer supplying the provided property name.

(Inherited from OwnedNavigationBuilder)
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.

Indexer properties are stored in the entity using an indexer supplying the provided property name.

(Inherited from OwnedNavigationBuilder)
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.

(Inherited from OwnedNavigationBuilder)
Navigation<TNavigation>(Expression<Func<TDependentEntity,IEnumerable<TNavigation>>>)

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.

Navigation<TNavigation>(Expression<Func<TDependentEntity,TNavigation>>)

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)

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

The target entity type for each ownership relationship is treated as a different entity type even if the navigation is of the same type. Configuration of the target entity type isn't applied to the target entity type of other ownership relationships.

Most operations on an owned entity require accessing it through the owner entity using the corresponding navigation.

After calling this method, you should chain a call to WithOwner(String) to fully configure the relationship.

(Inherited from OwnedNavigationBuilder)
OwnsMany(String, String, Action<OwnedNavigationBuilder>)

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

The target entity type for each ownership relationship is treated as a different entity type even if the navigation is of the same type. Configuration of the target entity type isn't applied to the target entity type of other ownership relationships.

Most operations on an owned entity require accessing it through the owner entity using the corresponding navigation.

After calling this method, you should chain a call to WithOwner to fully configure the relationship.

OwnsMany(String, String, Action<OwnedNavigationBuilder>)

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

The target entity type for each ownership relationship is treated as a different entity type even if the navigation is of the same type. Configuration of the target entity type isn't applied to the target entity type of other ownership relationships.

Most operations on an owned entity require accessing it through the owner entity using the corresponding navigation.

After calling this method, you should chain a call to WithOwner(String) to fully configure the relationship.

(Inherited from OwnedNavigationBuilder)
OwnsMany(String, Type, String)

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

The target entity type for each ownership relationship is treated as a different entity type even if the navigation is of the same type. Configuration of the target entity type isn't applied to the target entity type of other ownership relationships.

Most operations on an owned entity require accessing it through the owner entity using the corresponding navigation.

After calling this method, you should chain a call to WithOwner(String) to fully configure the relationship.

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

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

The target entity type for each ownership relationship is treated as a different entity type even if the navigation is of the same type. Configuration of the target entity type isn't applied to the target entity type of other ownership relationships.

Most operations on an owned entity require accessing it through the owner entity using the corresponding navigation.

After calling this method, you should chain a call to WithOwner to fully configure the relationship.

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

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

The target entity type for each ownership relationship is treated as a different entity type even if the navigation is of the same type. Configuration of the target entity type isn't applied to the target entity type of other ownership relationships.

Most operations on an owned entity require accessing it through the owner entity using the corresponding navigation.

After calling this method, you should chain a call to WithOwner(String) to fully configure the relationship.

(Inherited from OwnedNavigationBuilder)
OwnsMany(Type, String)

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

The target entity type for each ownership relationship is treated as a different entity type even if the navigation is of the same type. Configuration of the target entity type isn't applied to the target entity type of other ownership relationships.

Most operations on an owned entity require accessing it through the owner entity using the corresponding navigation.

After calling this method, you should chain a call to WithOwner(String) to fully configure the relationship.

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

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

The target entity type for each ownership relationship is treated as a different entity type even if the navigation is of the same type. Configuration of the target entity type isn't applied to the target entity type of other ownership relationships.

Most operations on an owned entity require accessing it through the owner entity using the corresponding navigation.

After calling this method, you should chain a call to WithOwner to fully configure the relationship.

OwnsMany(Type, String, Action<OwnedNavigationBuilder>)

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

The target entity type for each ownership relationship is treated as a different entity type even if the navigation is of the same type. Configuration of the target entity type isn't applied to the target entity type of other ownership relationships.

Most operations on an owned entity require accessing it through the owner entity using the corresponding navigation.

After calling this method, you should chain a call to WithOwner(String) to fully configure the relationship.

(Inherited from OwnedNavigationBuilder)
OwnsMany<TNewDependentEntity>(Expression<Func<TDependentEntity,IEnumerable<TNewDependentEntity>>>)

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

The target entity type for each ownership relationship is treated as a different entity type even if the navigation is of the same type. Configuration of the target entity type isn't applied to the target entity type of other ownership relationships.

Most operations on an owned entity require accessing it through the owner entity using the corresponding navigation.

After calling this method, you should chain a call to WithOwner to fully configure the relationship.

OwnsMany<TNewDependentEntity>(Expression<Func<TDependentEntity, IEnumerable<TNewDependentEntity>>>, Action<OwnedNavigationBuilder<TDependentEntity, TNewDependentEntity>>)

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

The target entity type for each ownership relationship is treated as a different entity type even if the navigation is of the same type. Configuration of the target entity type isn't applied to the target entity type of other ownership relationships.

Most operations on an owned entity require accessing it through the owner entity using the corresponding navigation.

After calling this method, you should chain a call to WithOwner to fully configure the relationship.

OwnsMany<TNewDependentEntity>(String)

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

The target entity type for each ownership relationship is treated as a different entity type even if the navigation is of the same type. Configuration of the target entity type isn't applied to the target entity type of other ownership relationships.

Most operations on an owned entity require accessing it through the owner entity using the corresponding navigation.

After calling this method, you should chain a call to WithOwner to fully configure the relationship.

OwnsMany<TNewDependentEntity>(String, Action<OwnedNavigationBuilder<TDependentEntity,TNewDependentEntity>>)

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

The target entity type for each ownership relationship is treated as a different entity type even if the navigation is of the same type. Configuration of the target entity type isn't applied to the target entity type of other ownership relationships.

Most operations on an owned entity require accessing it through the owner entity using the corresponding navigation.

After calling this method, you should chain a call to WithOwner to fully configure the relationship.

OwnsMany<TNewDependentEntity>(String, Expression<Func<TDependentEntity,IEnumerable<TNewDependentEntity>>>)

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

The target entity type for each ownership relationship is treated as a different entity type even if the navigation is of the same type. Configuration of the target entity type isn't applied to the target entity type of other ownership relationships.

Most operations on an owned entity require accessing it through the owner entity using the corresponding navigation.

After calling this method, you should chain a call to WithOwner to fully configure the relationship.

OwnsMany<TNewDependentEntity>(String, Expression<Func<TDependentEntity, IEnumerable<TNewDependentEntity>>>, Action<OwnedNavigationBuilder<TDependentEntity, TNewDependentEntity>>)

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

The target entity type for each ownership relationship is treated as a different entity type even if the navigation is of the same type. Configuration of the target entity type isn't applied to the target entity type of other ownership relationships.

Most operations on an owned entity require accessing it through the owner entity using the corresponding navigation.

After calling this method, you should chain a call to WithOwner to fully configure the relationship.

OwnsMany<TNewDependentEntity>(String, String)

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

The target entity type for each ownership relationship is treated as a different entity type even if the navigation is of the same type. Configuration of the target entity type isn't applied to the target entity type of other ownership relationships.

Most operations on an owned entity require accessing it through the owner entity using the corresponding navigation.

After calling this method, you should chain a call to WithOwner to fully configure the relationship.

OwnsMany<TNewDependentEntity>(String, String, Action<OwnedNavigationBuilder<TDependentEntity,TNewDependentEntity>>)

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

The target entity type for each ownership relationship is treated as a different entity type even if the navigation is of the same type. Configuration of the target entity type isn't applied to the target entity type of other ownership relationships.

Most operations on an owned entity require accessing it through the owner entity using the corresponding navigation.

After calling this method, you should chain a call to WithOwner to fully configure the relationship.

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.

The target entity type for each ownership relationship is treated as a different entity type even if the navigation is of the same type. Configuration of the target entity type isn't applied to the target entity type of other ownership relationships.

Most operations on an owned entity require accessing it through the owner entity using the corresponding navigation.

After calling this method, you should chain a call to WithOwner(String) to fully configure the relationship.

(Inherited from OwnedNavigationBuilder)
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.

The target entity type for each ownership relationship is treated as a different entity type even if the navigation is of the same type. Configuration of the target entity type isn't applied to the target entity type of other ownership relationships.

Most operations on an owned entity require accessing it through the owner entity using the corresponding navigation.

After calling this method, you should chain a call to WithOwner to fully configure the relationship.

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.

The target entity type for each ownership relationship is treated as a different entity type even if the navigation is of the same type. Configuration of the target entity type isn't applied to the target entity type of other ownership relationships.

Most operations on an owned entity require accessing it through the owner entity using the corresponding navigation.

After calling this method, you should chain a call to WithOwner(String) to fully configure the relationship.

(Inherited from OwnedNavigationBuilder)
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.

The target entity type for each ownership relationship is treated as a different entity type even if the navigation is of the same type. Configuration of the target entity type isn't applied to the target entity type of other ownership relationships.

Most operations on an owned entity require accessing it through the owner entity using the corresponding navigation.

After calling this method, you should chain a call to WithOwner(String) to fully configure the relationship.

(Inherited from OwnedNavigationBuilder)
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.

The target entity type for each ownership relationship is treated as a different entity type even if the navigation is of the same type. Configuration of the target entity type isn't applied to the target entity type of other ownership relationships.

Most operations on an owned entity require accessing it through the owner entity using the corresponding navigation.

After calling this method, you should chain a call to WithOwner to fully configure the relationship.

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.

The target entity type for each ownership relationship is treated as a different entity type even if the navigation is of the same type. Configuration of the target entity type isn't applied to the target entity type of other ownership relationships.

Most operations on an owned entity require accessing it through the owner entity using the corresponding navigation.

After calling this method, you should chain a call to WithOwner(String) to fully configure the relationship.

(Inherited from OwnedNavigationBuilder)
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.

The target entity type for each ownership relationship is treated as a different entity type even if the navigation is of the same type. Configuration of the target entity type isn't applied to the target entity type of other ownership relationships.

Most operations on an owned entity require accessing it through the owner entity using the corresponding navigation.

After calling this method, you should chain a call to WithOwner(String) to fully configure the relationship.

(Inherited from OwnedNavigationBuilder)
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.

The target entity type for each ownership relationship is treated as a different entity type even if the navigation is of the same type. Configuration of the target entity type isn't applied to the target entity type of other ownership relationships.

Most operations on an owned entity require accessing it through the owner entity using the corresponding navigation.

After calling this method, you should chain a call to WithOwner to fully configure the relationship.

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.

The target entity type for each ownership relationship is treated as a different entity type even if the navigation is of the same type. Configuration of the target entity type isn't applied to the target entity type of other ownership relationships.

Most operations on an owned entity require accessing it through the owner entity using the corresponding navigation.

After calling this method, you should chain a call to WithOwner(String) to fully configure the relationship.

(Inherited from OwnedNavigationBuilder)
OwnsOne<TNewDependentEntity>(Expression<Func<TDependentEntity,TNewDependentEntity>>)

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.

The target entity type for each ownership relationship is treated as a different entity type even if the navigation is of the same type. Configuration of the target entity type isn't applied to the target entity type of other ownership relationships.

Most operations on an owned entity require accessing it through the owner entity using the corresponding navigation.

After calling this method, you should chain a call to WithOwner to fully configure the relationship.

OwnsOne<TNewDependentEntity>(Expression<Func<TDependentEntity, TNewDependentEntity>>, Action<OwnedNavigationBuilder<TDependentEntity, TNewDependentEntity>>)

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.

The target entity type for each ownership relationship is treated as a different entity type even if the navigation is of the same type. Configuration of the target entity type isn't applied to the target entity type of other ownership relationships.

Most operations on an owned entity require accessing it through the owner entity using the corresponding navigation.

After calling this method, you should chain a call to WithOwner to fully configure the relationship.

OwnsOne<TNewDependentEntity>(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.

The target entity type for each ownership relationship is treated as a different entity type even if the navigation is of the same type. Configuration of the target entity type isn't applied to the target entity type of other ownership relationships.

Most operations on an owned entity require accessing it through the owner entity using the corresponding navigation.

After calling this method, you should chain a call to WithOwner to fully configure the relationship.

OwnsOne<TNewDependentEntity>(String, Action<OwnedNavigationBuilder<TDependentEntity,TNewDependentEntity>>)

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.

The target entity type for each ownership relationship is treated as a different entity type even if the navigation is of the same type. Configuration of the target entity type isn't applied to the target entity type of other ownership relationships.

Most operations on an owned entity require accessing it through the owner entity using the corresponding navigation.

After calling this method, you should chain a call to WithOwner to fully configure the relationship.

OwnsOne<TNewDependentEntity>(String, Expression<Func<TDependentEntity,TNewDependentEntity>>)

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.

The target entity type for each ownership relationship is treated as a different entity type even if the navigation is of the same type. Configuration of the target entity type isn't applied to the target entity type of other ownership relationships.

Most operations on an owned entity require accessing it through the owner entity using the corresponding navigation.

After calling this method, you should chain a call to WithOwner to fully configure the relationship.

OwnsOne<TNewDependentEntity>(String, Expression<Func<TDependentEntity, TNewDependentEntity>>, Action<OwnedNavigationBuilder<TDependentEntity, TNewDependentEntity>>)

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.

The target entity type for each ownership relationship is treated as a different entity type even if the navigation is of the same type. Configuration of the target entity type isn't applied to the target entity type of other ownership relationships.

Most operations on an owned entity require accessing it through the owner entity using the corresponding navigation.

After calling this method, you should chain a call to WithOwner to fully configure the relationship.

OwnsOne<TNewDependentEntity>(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.

The target entity type for each ownership relationship is treated as a different entity type even if the navigation is of the same type. Configuration of the target entity type isn't applied to the target entity type of other ownership relationships.

Most operations on an owned entity require accessing it through the owner entity using the corresponding navigation.

After calling this method, you should chain a call to WithOwner to fully configure the relationship.

OwnsOne<TNewDependentEntity>(String, String, Action<OwnedNavigationBuilder<TDependentEntity,TNewDependentEntity>>)

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.

The target entity type for each ownership relationship is treated as a different entity type even if the navigation is of the same type. Configuration of the target entity type isn't applied to the target entity type of other ownership relationships.

Most operations on an owned entity require accessing it through the owner entity using the corresponding navigation.

After calling this method, you should chain a call to WithOwner to fully configure the relationship.

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.

When adding a new property with this overload the property name must match the name of a CLR property or field on the entity type. This overload cannot be used to add a new shadow state property.

(Inherited from OwnedNavigationBuilder)
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.

When adding a new property, if a property with the same name exists in the entity class then it will be added to the model. If no property exists in the entity class, then a new shadow state property will be added. A shadow state property is one that does not have a corresponding property in the entity class. The current value for the property is stored in the ChangeTracker rather than being stored in instances of the entity class.

(Inherited from OwnedNavigationBuilder)
Property<TProperty>(Expression<Func<TDependentEntity,TProperty>>)

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.

When adding a new property, if a property with the same name exists in the entity class then it will be added to the model. If no property exists in the entity class, then a new shadow state property will be added. A shadow state property is one that does not have a corresponding property in the entity class. The current value for the property is stored in the ChangeTracker rather than being stored in instances of the entity class.

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.

When adding a new property, if a property with the same name exists in the entity class then it will be added to the model. If no property exists in the entity class, then a new shadow state property will be added. A shadow state property is one that does not have a corresponding property in the entity class. The current value for the property is stored in the ChangeTracker rather than being stored in instances of the entity class.

(Inherited from OwnedNavigationBuilder)
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.

(Inherited from OwnedNavigationBuilder)
UsePropertyAccessMode(PropertyAccessMode)

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

By default, the backing field, if one is found by convention or has been specified, is used when new objects are constructed, typically when entities are queried from the database. Properties are used for all other accesses. Calling this method will change that behavior for all properties of this entity type as described in the PropertyAccessMode enum.

Calling this method overrides for all properties of this entity type any access mode that was set on the model.

WithOwner(Expression<Func<TDependentEntity,TEntity>>)

Configures the relationship to the owner.

Note that calling this method with no parameters will explicitly configure this side of the relationship to use no navigation property, even if such a property exists on the entity type. If the navigation property is to be used, then it must be specified.

WithOwner(String)

Configures the relationship to the owner.

Note that calling this method with no parameters will explicitly configure this side of the relationship to use no navigation property, even if such a property exists on the entity type. If the navigation property is to be used, then it must be specified.

Explicit Interface Implementations

IInfrastructure<IConventionEntityTypeBuilder>.Instance

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

(Inherited from OwnedNavigationBuilder)
IInfrastructure<InternalEntityTypeBuilder>.Instance

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

(Inherited from OwnedNavigationBuilder)

Extension Methods

ToJsonProperty(OwnedNavigationBuilder, String)

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

ToJsonProperty<TOwnerEntity,TDependentEntity>(OwnedNavigationBuilder<TOwnerEntity,TDependentEntity>, 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.

IInfrastructure<T> is used to hide properties that are not intended to be used in application code but can be used in extension methods written by database providers etc.

HasCheckConstraint(OwnedNavigationBuilder, String, String)

Configures a database check constraint when targeting a relational database.

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

Configures a database check constraint when targeting a relational database.

HasCheckConstraint<TOwnerEntity,TDependentEntity>(OwnedNavigationBuilder<TOwnerEntity,TDependentEntity>, String, String)

Configures a database check constraint when targeting a relational database.

HasCheckConstraint<TOwnerEntity,TDependentEntity>(OwnedNavigationBuilder<TOwnerEntity, TDependentEntity>, String, String, Action<CheckConstraintBuilder>)

Configures a database check constraint when targeting a relational database.

ToFunction(OwnedNavigationBuilder, MethodInfo)

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, String)

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<TOwnerEntity,TRelatedEntity>(OwnedNavigationBuilder<TOwnerEntity,TRelatedEntity>, MethodInfo)

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

ToFunction<TOwnerEntity,TRelatedEntity>(OwnedNavigationBuilder<TOwnerEntity,TRelatedEntity>, MethodInfo, Action<TableValuedFunctionBuilder>)

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

ToFunction<TOwnerEntity,TRelatedEntity>(OwnedNavigationBuilder<TOwnerEntity,TRelatedEntity>, String)

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

ToFunction<TOwnerEntity,TRelatedEntity>(OwnedNavigationBuilder<TOwnerEntity,TRelatedEntity>, String, Action<TableValuedFunctionBuilder>)

Configures the function 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)

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)

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<TOwnerEntity,TRelatedEntity>(OwnedNavigationBuilder<TOwnerEntity,TRelatedEntity>, Action<TableBuilder<TRelatedEntity>>)

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

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

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

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

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

ToTable<TOwnerEntity,TRelatedEntity>(OwnedNavigationBuilder<TOwnerEntity,TRelatedEntity>, String)

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

ToTable<TOwnerEntity,TRelatedEntity>(OwnedNavigationBuilder<TOwnerEntity,TRelatedEntity>, String, Boolean)
Obsolete.

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

ToTable<TOwnerEntity,TRelatedEntity>(OwnedNavigationBuilder<TOwnerEntity,TRelatedEntity>, String, String)

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

ToTable<TOwnerEntity,TRelatedEntity>(OwnedNavigationBuilder<TOwnerEntity,TRelatedEntity>, String, String, Boolean)
Obsolete.

Configures the table 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.

ToView(OwnedNavigationBuilder, String, String)

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

ToView<TOwnerEntity,TRelatedEntity>(OwnedNavigationBuilder<TOwnerEntity,TRelatedEntity>, String)

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

ToView<TOwnerEntity,TRelatedEntity>(OwnedNavigationBuilder<TOwnerEntity,TRelatedEntity>, String, String)

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

HasCheckConstraint(OwnedNavigationBuilder, String, String)

Configures a database check constraint when targeting a relational database.

HasCheckConstraint<TEntity,TDependentEntity>(OwnedNavigationBuilder<TEntity,TDependentEntity>, String, String)

Configures a database check constraint when targeting a relational database.

ForSqlServerIsMemoryOptimized(OwnedNavigationBuilder, Boolean)
Obsolete.

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

ForSqlServerIsMemoryOptimized<TEntity,TRelatedEntity>(OwnedNavigationBuilder<TEntity,TRelatedEntity>, Boolean)
Obsolete.

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

IsMemoryOptimized(OwnedNavigationBuilder, Boolean)

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

IsMemoryOptimized<TEntity,TRelatedEntity>(OwnedNavigationBuilder<TEntity,TRelatedEntity>, Boolean)

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

Applies to