Language

CosmosJsonIdConvention クラス

定義

PK プロパティまたは識別子プロパティを JSON 'id' プロパティにマッピングすることを構成する規則。

[System.Runtime.CompilerServices.Nullable(0)]
public class CosmosJsonIdConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.IDiscriminatorPropertySetConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeAnnotationChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeBaseTypeChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IForeignKeyOwnershipChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IKeyAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IKeyRemovedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IModelAnnotationChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IPropertyAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IPropertyAnnotationChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IPropertyRemovedConvention
[<System.Runtime.CompilerServices.Nullable(0)>]
type CosmosJsonIdConvention = class
    interface IEntityTypeAddedConvention
    interface IConvention
    interface IEntityTypeBaseTypeChangedConvention
    interface IEntityTypeAnnotationChangedConvention
    interface IForeignKeyOwnershipChangedConvention
    interface IKeyAddedConvention
    interface IKeyRemovedConvention
    interface IPropertyAddedConvention
    interface IPropertyRemovedConvention
    interface IPropertyAnnotationChangedConvention
    interface IModelAnnotationChangedConvention
    interface IDiscriminatorPropertySetConvention
Public Class CosmosJsonIdConvention
Implements IDiscriminatorPropertySetConvention, IEntityTypeAddedConvention, IEntityTypeAnnotationChangedConvention, IEntityTypeBaseTypeChangedConvention, IForeignKeyOwnershipChangedConvention, IKeyAddedConvention, IKeyRemovedConvention, IModelAnnotationChangedConvention, IPropertyAddedConvention, IPropertyAnnotationChangedConvention, IPropertyRemovedConvention
継承
CosmosJsonIdConvention
属性
実装

注釈

詳細と例については、「モデルの構築規則」および「EF Core を使用したAzure Cosmos DBへのアクセス」を参照してください。

コンストラクター

Name 説明
CosmosJsonIdConvention(ProviderConventionSetBuilderDependencies, IJsonIdDefinitionFactory)

CosmosJsonIdConventionの新しいインスタンスを作成します。

フィールド

Name 説明
DefaultIdPropertyName

これは、パブリック API と同じ互換性標準の対象ではなく、Entity Framework Core インフラストラクチャをサポートする内部 API です。 これは、任意のリリースで予告なしに変更または削除される可能性があります。 コード内で直接使用する場合は、細心の注意を払う必要があります。これを行うと、新しいEntity Framework Core リリースに更新するときにアプリケーションのエラーが発生する可能性があることを認識してください。

IdPropertyJsonName

これは、パブリック API と同じ互換性標準の対象ではなく、Entity Framework Core インフラストラクチャをサポートする内部 API です。 これは、任意のリリースで予告なしに変更または削除される可能性があります。 コード内で直接使用する場合は、細心の注意を払う必要があります。これを行うと、新しいEntity Framework Core リリースに更新するときにアプリケーションのエラーが発生する可能性があることを認識してください。

プロパティ

Name 説明
DefinitionFactory

エンティティ型ごとに Microsoft.EntityFrameworkCore.Cosmos.Metadata.Internal.IJsonIdDefinition を作成するファクトリ。

Dependencies

このサービスの依存関係。

メソッド

Name 説明
ProcessDiscriminatorPropertySet(IConventionEntityTypeBuilder, String, IConventionContext<String>)

識別子プロパティが設定された後に呼び出されます。

ProcessDiscriminatorPropertySet(IConventionTypeBaseBuilder, String, IConventionContext<String>)

識別子プロパティが設定された後に呼び出されます。

ProcessEntityTypeAdded(IConventionEntityTypeBuilder, IConventionContext<IConventionEntityTypeBuilder>)

エンティティ型がモデルに追加された後に呼び出されます。

ProcessEntityTypeAnnotationChanged(IConventionEntityTypeBuilder, String, IConventionAnnotation, IConventionAnnotation, IConventionContext<IConventionAnnotation>)

エンティティ型で注釈が変更された後に呼び出されます。

ProcessEntityTypeBaseTypeChanged(IConventionEntityTypeBuilder, IConventionEntityType, IConventionEntityType, IConventionContext<IConventionEntityType>)

エンティティ型の基本型が変更された後に呼び出されます。

ProcessForeignKeyOwnershipChanged(IConventionForeignKeyBuilder, IConventionContext<Nullable<Boolean>>)

外部キーの所有権の値が変更された後に呼び出されます。

ProcessKeyAdded(IConventionKeyBuilder, IConventionContext<IConventionKeyBuilder>)

エンティティ型にキーが追加された後に呼び出されます。

ProcessKeyRemoved(IConventionEntityTypeBuilder, IConventionKey, IConventionContext<IConventionKey>)

キーが削除された後に呼び出されます。

ProcessModelAnnotationChanged(IConventionModelBuilder, String, IConventionAnnotation, IConventionAnnotation, IConventionContext<IConventionAnnotation>)

モデルで注釈が変更された後に呼び出されます。

ProcessPropertyAdded(IConventionPropertyBuilder, IConventionContext<IConventionPropertyBuilder>)

プロパティがエンティティ型に追加された後に呼び出されます。

ProcessPropertyAnnotationChanged(IConventionPropertyBuilder, String, IConventionAnnotation, IConventionAnnotation, IConventionContext<IConventionAnnotation>)

プロパティで注釈が変更された後に呼び出されます。

ProcessPropertyRemoved(IConventionTypeBaseBuilder, IConventionProperty, IConventionContext<IConventionProperty>)

エンティティ型からプロパティが削除された後に呼び出されます。

適用対象