StoreKeyConvention 类
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
添加“id”属性的约定 -Azure Cosmos 所需的密钥。
public class StoreKeyConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeAnnotationChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeBaseTypeChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IForeignKeyOwnershipChangedConvention
public class StoreKeyConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeAnnotationChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeBaseTypeChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IForeignKeyOwnershipChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IForeignKeyRemovedConvention
public class StoreKeyConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeAnnotationChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeBaseTypeChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypePrimaryKeyChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IForeignKeyOwnershipChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IForeignKeyRemovedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IKeyAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IKeyRemovedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IPropertyAnnotationChangedConvention
[System.Runtime.CompilerServices.Nullable(0)]
public class StoreKeyConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeAnnotationChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeBaseTypeChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypePrimaryKeyChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IForeignKeyOwnershipChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IForeignKeyRemovedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IKeyAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IKeyRemovedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IPropertyAnnotationChangedConvention
type StoreKeyConvention = class
interface IEntityTypeAddedConvention
interface IConvention
interface IForeignKeyOwnershipChangedConvention
interface IEntityTypeAnnotationChangedConvention
interface IEntityTypeBaseTypeChangedConvention
type StoreKeyConvention = class
interface IEntityTypeAddedConvention
interface IConvention
interface IForeignKeyOwnershipChangedConvention
interface IForeignKeyRemovedConvention
interface IEntityTypeAnnotationChangedConvention
interface IEntityTypeBaseTypeChangedConvention
type StoreKeyConvention = class
interface IEntityTypeAddedConvention
interface IConvention
interface IPropertyAnnotationChangedConvention
interface IForeignKeyOwnershipChangedConvention
interface IForeignKeyRemovedConvention
interface IKeyAddedConvention
interface IKeyRemovedConvention
interface IEntityTypePrimaryKeyChangedConvention
interface IEntityTypeAnnotationChangedConvention
interface IEntityTypeBaseTypeChangedConvention
[<System.Runtime.CompilerServices.Nullable(0)>]
type StoreKeyConvention = class
interface IEntityTypeAddedConvention
interface IConvention
interface IPropertyAnnotationChangedConvention
interface IForeignKeyOwnershipChangedConvention
interface IForeignKeyRemovedConvention
interface IKeyAddedConvention
interface IKeyRemovedConvention
interface IEntityTypePrimaryKeyChangedConvention
interface IEntityTypeAnnotationChangedConvention
interface IEntityTypeBaseTypeChangedConvention
Public Class StoreKeyConvention
Implements IEntityTypeAddedConvention, IEntityTypeAnnotationChangedConvention, IEntityTypeBaseTypeChangedConvention, IForeignKeyOwnershipChangedConvention
Public Class StoreKeyConvention
Implements IEntityTypeAddedConvention, IEntityTypeAnnotationChangedConvention, IEntityTypeBaseTypeChangedConvention, IForeignKeyOwnershipChangedConvention, IForeignKeyRemovedConvention
Public Class StoreKeyConvention
Implements IEntityTypeAddedConvention, IEntityTypeAnnotationChangedConvention, IEntityTypeBaseTypeChangedConvention, IEntityTypePrimaryKeyChangedConvention, IForeignKeyOwnershipChangedConvention, IForeignKeyRemovedConvention, IKeyAddedConvention, IKeyRemovedConvention, IPropertyAnnotationChangedConvention
- 继承
-
StoreKeyConvention
- 特性
- 实现
注解
此约定还会添加包含存储返回的 JSON 对象的“__jObject”。
有关详细信息和示例,请参阅使用 EF Core的模型生成约定和访问Azure Cosmos DB。
构造函数
| 名称 | 说明 |
|---|---|
| StoreKeyConvention(ProviderConventionSetBuilderDependencies) |
创建 StoreKeyConvention的新实例。 |
字段
| 名称 | 说明 |
|---|---|
| DefaultIdPropertyName |
这是一个内部 API,支持Entity Framework Core基础结构,不受与公共 API 相同的兼容性标准的约束。 可以在任何版本中更改或删除它,而不通知。 只需在代码中直接使用它,并非常谨慎地知道这样做可能会导致应用程序在更新到新的Entity Framework Core版本时失败。 |
| IdPropertyJsonName |
这是一个内部 API,支持Entity Framework Core基础结构,不受与公共 API 相同的兼容性标准的约束。 可以在任何版本中更改或删除它,而不通知。 只需在代码中直接使用它,并非常谨慎地知道这样做可能会导致应用程序在更新到新的Entity Framework Core版本时失败。 |
| IdPropertyName |
添加“id”属性的约定 -Azure Cosmos 所需的密钥。 |
| JObjectPropertyName |
这是一个内部 API,支持Entity Framework Core基础结构,不受与公共 API 相同的兼容性标准的约束。 可以在任何版本中更改或删除它,而不通知。 只需在代码中直接使用它,并非常谨慎地知道这样做可能会导致应用程序在更新到新的Entity Framework Core版本时失败。 |
属性
| 名称 | 说明 |
|---|---|
| Dependencies |
此服务的依赖项。 |