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
- 继承
- 实现
注解
有关详细信息和示例,请参阅 模型构建约定 和 EF Core 值生成 。
构造函数
| 名称 | 说明 |
|---|---|
| CosmosValueGenerationConvention(ProviderConventionSetBuilderDependencies) |
创建 CosmosValueGenerationConvention的新实例。 |
属性
| 名称 | 说明 |
|---|---|
| Dependencies |
此服务的依赖项。 (继承自 ValueGenerationConvention) |