閱讀英文版本

分享方式:


CosmosInversePropertyAttributeConvention Class

Definition

A convention that configures the inverse navigation property based on the InversePropertyAttribute specified on the other navigation property. All navigations are assumed to be targeting owned entity types for Cosmos.

C#
public class CosmosInversePropertyAttributeConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.InversePropertyAttributeConvention
Inheritance

Remarks

See Model building conventions, and Accessing Azure Cosmos DB with EF Core for more information and examples.

Constructors

Properties

Dependencies

Dependencies for this service.

(Inherited from NavigationAttributeConventionBase<TAttribute>)

Methods

ProcessEntityTypeAdded(IConventionEntityTypeBuilder, IConventionContext<IConventionEntityTypeBuilder>)

Called after an entity type is added to the model.

(Inherited from NavigationAttributeConventionBase<TAttribute>)
ProcessEntityTypeAdded(IConventionEntityTypeBuilder, MemberInfo, Type, InversePropertyAttribute, IConventionContext<IConventionEntityTypeBuilder>)

Called for every navigation property that has an attribute after an entity type is added to the model.

(Inherited from InversePropertyAttributeConvention)
ProcessEntityTypeAdded(IConventionEntityTypeBuilder, MemberInfo, Type, TAttribute, IConventionContext<IConventionEntityTypeBuilder>)

Called for every navigation property that has an attribute after an entity type is added to the model.

(Inherited from NavigationAttributeConventionBase<TAttribute>)
ProcessEntityTypeBaseTypeChanged(IConventionEntityTypeBuilder, IConventionEntityType, IConventionEntityType, IConventionContext<IConventionEntityType>)

Called after the base type of an entity type changes.

(Inherited from InversePropertyAttributeConvention)
ProcessEntityTypeBaseTypeChanged(IConventionEntityTypeBuilder, IConventionEntityType, IConventionEntityType, MemberInfo, Type, InversePropertyAttribute, IConventionContext<IConventionEntityType>)

Called for every navigation property that has an attribute after the base type for an entity type is changed.

(Inherited from InversePropertyAttributeConvention)
ProcessEntityTypeBaseTypeChanged(IConventionEntityTypeBuilder, IConventionEntityType, IConventionEntityType, MemberInfo, Type, TAttribute, IConventionContext<IConventionEntityType>)

Called for every navigation property that has an attribute after the base type for an entity type is changed.

(Inherited from NavigationAttributeConventionBase<TAttribute>)
ProcessEntityTypeIgnored(IConventionModelBuilder, String, Type, IConventionContext<String>)

Called after an entity type is ignored.

(Inherited from NavigationAttributeConventionBase<TAttribute>)
ProcessEntityTypeIgnored(IConventionModelBuilder, Type, MemberInfo, Type, InversePropertyAttribute, IConventionContext<String>)

Called for every navigation property that has an attribute after an entity type is ignored.

(Inherited from InversePropertyAttributeConvention)
ProcessEntityTypeIgnored(IConventionModelBuilder, Type, MemberInfo, Type, TAttribute, IConventionContext<String>)

Called for every navigation property that has an attribute after an entity type is ignored.

(Inherited from NavigationAttributeConventionBase<TAttribute>)
ProcessEntityTypeMemberIgnored(IConventionEntityTypeBuilder, MemberInfo, Type, InversePropertyAttribute, IConventionContext<String>)

Called after a navigation property that has an attribute is ignored.

(Inherited from InversePropertyAttributeConvention)
ProcessEntityTypeMemberIgnored(IConventionEntityTypeBuilder, MemberInfo, Type, TAttribute, IConventionContext<String>)

Called after a navigation property that has an attribute is ignored.

(Inherited from NavigationAttributeConventionBase<TAttribute>)
ProcessEntityTypeMemberIgnored(IConventionEntityTypeBuilder, String, IConventionContext<String>)

Called after an entity type member is ignored.

(Inherited from InversePropertyAttributeConvention)
ProcessEntityTypeRemoved(IConventionModelBuilder, IConventionEntityType, IConventionContext<IConventionEntityType>)

Called after an entity type is removed from the model.

(Inherited from NavigationAttributeConventionBase<TAttribute>)
ProcessEntityTypeRemoved(IConventionModelBuilder, IConventionEntityType, MemberInfo, Type, InversePropertyAttribute, IConventionContext<IConventionEntityType>)

Called for every navigation property that has an attribute after an entity type is removed.

(Inherited from InversePropertyAttributeConvention)
ProcessEntityTypeRemoved(IConventionModelBuilder, IConventionEntityType, MemberInfo, Type, TAttribute, IConventionContext<IConventionEntityType>)

Called for every navigation property that has an attribute after an entity type is removed.

(Inherited from NavigationAttributeConventionBase<TAttribute>)
ProcessEntityTypeRemoved(IConventionModelBuilder, Type, MemberInfo, Type, InversePropertyAttribute, IConventionContext<IConventionEntityType>)

Called for every navigation property that has an attribute after an entity type is removed.

(Inherited from InversePropertyAttributeConvention)
ProcessEntityTypeRemoved(IConventionModelBuilder, Type, MemberInfo, Type, TAttribute, IConventionContext<IConventionEntityType>)

Called for every navigation property that has an attribute after an entity type is removed.

(Inherited from NavigationAttributeConventionBase<TAttribute>)
ProcessForeignKeyPrincipalEndChanged(IConventionForeignKeyBuilder, IConventionContext<IConventionForeignKeyBuilder>)

Called after the principal end of a foreign key is changed.

(Inherited from NavigationAttributeConventionBase<TAttribute>)
ProcessForeignKeyPrincipalEndChanged(IConventionForeignKeyBuilder, IEnumerable<TAttribute>, IEnumerable<TAttribute>, IConventionContext<IConventionForeignKeyBuilder>)

Called after the principal end of a foreign key is changed.

(Inherited from NavigationAttributeConventionBase<TAttribute>)
ProcessModelFinalized(IConventionModelBuilder, IConventionContext<IConventionModelBuilder>)

Called after a model is finalized.

(Inherited from InversePropertyAttributeConvention)
ProcessModelFinalizing(IConventionModelBuilder, IConventionContext<IConventionModelBuilder>)

Called when a model is being finalized.

(Inherited from InversePropertyAttributeConvention)
ProcessNavigationAdded(IConventionNavigationBuilder, IConventionContext<IConventionNavigationBuilder>)

Called after a navigation is added to the entity type.

(Inherited from NavigationAttributeConventionBase<TAttribute>)
ProcessNavigationAdded(IConventionNavigationBuilder, InversePropertyAttribute, IConventionContext<IConventionNavigationBuilder>)

Called after a navigation property that has an attribute is added to an entity type.

(Inherited from InversePropertyAttributeConvention)
ProcessNavigationAdded(IConventionNavigationBuilder, TAttribute, IConventionContext<IConventionNavigationBuilder>)

Called after a navigation property that has an attribute is added to an entity type.

(Inherited from NavigationAttributeConventionBase<TAttribute>)
ProcessNavigationAdded(IConventionRelationshipBuilder, IConventionNavigation, IConventionContext<IConventionNavigation>)

Called after a navigation is added to the entity type.

(Inherited from NavigationAttributeConventionBase<TAttribute>)
ProcessNavigationAdded(IConventionRelationshipBuilder, IConventionNavigation, InversePropertyAttribute, IConventionContext<IConventionNavigation>)

Called after a navigation property that has an attribute is added to an entity type.

(Inherited from InversePropertyAttributeConvention)
ProcessNavigationAdded(IConventionRelationshipBuilder, IConventionNavigation, TAttribute, IConventionContext<IConventionNavigation>)

Called after a navigation property that has an attribute is added to an entity type.

(Inherited from NavigationAttributeConventionBase<TAttribute>)
ProcessSkipNavigationAdded(IConventionSkipNavigationBuilder, IConventionContext<IConventionSkipNavigationBuilder>)

Called after a skip navigation is added to the entity type.

(Inherited from NavigationAttributeConventionBase<TAttribute>)
ProcessSkipNavigationAdded(IConventionSkipNavigationBuilder, TAttribute, IConventionContext<IConventionSkipNavigationBuilder>)

Called after a skip navigation property that has an attribute is added to an entity type.

(Inherited from NavigationAttributeConventionBase<TAttribute>)
ProcessTypeIgnored(IConventionModelBuilder, String, Type, IConventionContext<String>)

Called after an entity type is ignored.

(Inherited from NavigationAttributeConventionBase<TAttribute>)
ProcessTypeIgnored(IConventionModelBuilder, Type, MemberInfo, Type, TAttribute, IConventionContext<String>)

Called for every navigation property that has an attribute after an entity type is ignored.

(Inherited from NavigationAttributeConventionBase<TAttribute>)
TryGetTargetEntityTypeBuilder(IConventionEntityTypeBuilder, Type, MemberInfo, Boolean)

Finds or tries to create an entity type target for the given navigation member.

Applies to

產品 版本
Entity Framework Core 6.0, 7.0, 8.0, 9.0