CosmosValueGenerationConvention 类
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
一种约定,用于将存储值生成配置为 OnAdd 属于主键的一部分,而不是任何外键的一部分或配置为具有数据库默认值的属性。
public class CosmosValueGenerationConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.ValueGenerationConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeAnnotationChangedConvention
type CosmosValueGenerationConvention = class
inherit ValueGenerationConvention
interface IEntityTypeAnnotationChangedConvention
interface IConvention
Public Class CosmosValueGenerationConvention
Inherits ValueGenerationConvention
Implements IEntityTypeAnnotationChangedConvention
继承
CosmosValueGenerationConvention
实现
有关详细信息和示例,请参阅 模型生成约定 和 EF Core 值生成 。
构造函数
属性
方法
GetValueGenerated(IConventionProperty)
返回为给定属性设置的存储值生成策略。
ProcessEntityTypeAnnotationChanged(IConventionEntityTypeBuilder,
String, IConventionAnnotation, IConventionAnnotation, IConventionContext<IConventionAnnotation>)
在实体类型上更改批注后调用。
ProcessEntityTypeBaseTypeChanged(IConventionEntityTypeBuilder,
IConventionEntityType, IConventionEntityType, IConventionContext<IConventionEntityType>)
在实体类型的基类型更改后调用。
(继承自 ValueGenerationConvention )
ProcessEntityTypePrimaryKeyChanged(IConventionEntityTypeBuilder, IConventionKey, IConventionKey, IConventionContext<IConventionKey>)
在实体类型的主键更改后调用。
(继承自 ValueGenerationConvention )
ProcessForeignKeyAdded(IConventionForeignKeyBuilder, IConventionContext<IConventionForeignKeyBuilder>)
在将外键添加到实体类型后调用。
(继承自 ValueGenerationConvention )
ProcessForeignKeyAdded(IConventionRelationshipBuilder, IConventionContext<IConventionRelationshipBuilder>)
在将外键添加到实体类型后调用。
(继承自 ValueGenerationConvention )
ProcessForeignKeyOwnershipChanged(IConventionForeignKeyBuilder, IConventionContext<Nullable<Boolean>>)
在更改外键的所有权值后调用。
(继承自 ValueGenerationConvention )
ProcessForeignKeyPropertiesChanged(IConventionForeignKeyBuilder,
IReadOnlyList<IConventionProperty>, IConventionKey, IConventionContext<IReadOnlyList<IConventionProperty>>)
在更改外键属性或主体键后调用。
(继承自 ValueGenerationConvention )
ProcessForeignKeyPropertiesChanged(IConventionRelationshipBuilder,
IReadOnlyList<IConventionProperty>, IConventionKey, IConventionContext<IConventionRelationshipBuilder>)
在更改外键属性或主体键后调用。
(继承自 ValueGenerationConvention )
ProcessForeignKeyRemoved(IConventionEntityTypeBuilder, IConventionForeignKey, IConventionContext<IConventionForeignKey>)
在删除外键后调用。
(继承自 ValueGenerationConvention )
适用于