IConventionKey インターフェイス
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
エンティティの主キーまたは代替キーを表します。
public interface IConventionKey : Microsoft.EntityFrameworkCore.Metadata.IConventionAnnotatable, Microsoft.EntityFrameworkCore.Metadata.IReadOnlyKey
public interface IConventionKey : Microsoft.EntityFrameworkCore.Metadata.IConventionAnnotatable, Microsoft.EntityFrameworkCore.Metadata.IKey
type IConventionKey = interface
interface IReadOnlyKey
interface IReadOnlyAnnotatable
interface IConventionAnnotatable
type IConventionKey = interface
interface IConventionAnnotatable
interface IAnnotatable
interface IKey
Public Interface IConventionKey
Implements IConventionAnnotatable, IReadOnlyKey
Public Interface IConventionKey
Implements IConventionAnnotatable, IKey
- 実装
注釈
このインターフェイスは、モデルの作成時に使用され、メタデータを変更できます。 モデルが構築されると、 IKey は同じメタデータの読み取り専用ビューを表します。
詳細と例については、「 モデル構築規則 」を参照してください。
プロパティ
| Name | 説明 |
|---|---|
| Builder |
このキーの構成に使用できるビルダーを取得します。 |
| DeclaringEntityType |
キーが定義されているエンティティ型を取得します。 これは、キーが継承階層で派生型として定義されるときに Properties 定義される型とは異なる場合があります (プロパティは基本型で定義される可能性があるため)。 |
| IsInModel |
このオブジェクトがモデル内にあるかどうか、つまり、モデルから削除されていないかどうかを示します。 (継承元 IConventionAnnotatable) |
| Item[String] |
指定した名前の値注釈を取得し、存在しない場合は |
| Properties |
キーを構成するプロパティを取得します。 |
メソッド
| Name | 説明 |
|---|---|
| AddAnnotation(String, Object, Boolean) |
このオブジェクトに注釈を追加します。 指定した名前の注釈が既に存在する場合にスローします。 (継承元 IConventionAnnotatable) |
| AddAnnotations(IEnumerable<IConventionAnnotation>, Boolean) |
オブジェクトに注釈を追加します。 (継承元 IConventionAnnotatable) |
| AddRuntimeAnnotation(String, Object) |
このオブジェクトにランタイム注釈を追加します。 指定した名前の注釈が既に存在する場合にスローします。 (継承元 IAnnotatable) |
| AnnotationsToDebugString(Int32) |
オブジェクトで宣言されているすべての注釈のデバッグ文字列を取得します。 (継承元 IReadOnlyAnnotatable) |
| FindAnnotation(String) |
指定した名前の注釈を取得し、存在しない場合は |
| FindRuntimeAnnotation(String) |
指定された名前のランタイム注釈を取得し、存在しない場合は |
| FindRuntimeAnnotationValue(String) |
指定した名前のランタイム注釈の値を取得し、存在しない場合は |
| GetAnnotation(String) |
指定した名前の注釈を取得し、存在しない場合はスローします。 (継承元 IConventionAnnotatable) |
| GetAnnotations() |
現在のオブジェクトのすべての注釈を取得します。 (継承元 IAnnotatable) |
| GetConfigurationSource() |
このキーの構成ソースを返します。 |
| GetKeyType() |
単純キーのキー プロパティの型、または複合キーのオブジェクト配列を返します。 (継承元 IKey) |
| GetOrAddRuntimeAnnotationValue<TValue,TArg>(String, Func<TArg,TValue>, TArg) |
指定された名前を持つランタイム注釈の値を取得し、存在しない場合は追加します。 (継承元 IAnnotatable) |
| GetPrincipalKeyValueFactory() |
さまざまな形式のエンティティ データから取得されたキー値に基づいて、キー値のファクトリを取得します。 このメソッドは、通常、データベース プロバイダー (およびその他の拡張機能) によって使用されます。 通常、アプリケーション コードでは使用されません。 (継承元 IKey) |
| GetPrincipalKeyValueFactory<TKey>() |
さまざまな形式のエンティティ データから取得されたキー値に基づいて、キー値のファクトリを取得します。 このメソッドは、通常、データベース プロバイダー (およびその他の拡張機能) によって使用されます。 通常、アプリケーション コードでは使用されません。 (継承元 IKey) |
| GetReferencingForeignKeys() |
特定の主キーまたは代替キーを対象とするすべての外部キーを取得します。 |
| GetRuntimeAnnotations() |
現在のオブジェクトのすべてのランタイム注釈を取得します。 (継承元 IAnnotatable) |
| IsPrimaryKey() |
キーが主キーかどうかを示す値を返します。 (継承元 IReadOnlyKey) |
| RemoveAnnotation(String) |
指定した名前の注釈をこのオブジェクトから削除します。 (継承元 IConventionAnnotatable) |
| RemoveRuntimeAnnotation(String) |
指定されたランタイム注釈をこのオブジェクトから削除します。 (継承元 IAnnotatable) |
| SetAnnotation(String, Object, Boolean) |
指定した名前の下に格納されている注釈を設定します。 指定した名前の注釈が既に存在する場合は、既存の注釈を上書きします。 (継承元 IConventionAnnotatable) |
| SetOrRemoveAnnotation(String, Object, Boolean) |
指定した名前の下に格納されている注釈を設定します。 指定した名前の注釈が既に存在する場合は、既存の注釈を上書きします。
|
| SetRuntimeAnnotation(String, Object) |
指定されたキーの下に格納されているランタイム注釈を設定します。 指定した名前の注釈が既に存在する場合は、既存の注釈を上書きします。 (継承元 IAnnotatable) |
| ToDebugString(MetadataDebugStringOptions, Int32) |
指定されたメタデータの人間が判読できる表現を作成します。 警告: 返される文字列の形式に依存しないでください。 デバッグ専用に設計されており、リリース間で任意に変更される可能性があります。 (継承元 IReadOnlyKey) |