Bagikan melalui


AnnotatableBuilder<TMetadata,TModelBuilder>.IConventionAnnotatableBuilder.HasAnnotation Metode

Definisi

Mengatur anotasi yang disimpan di bawah nama yang diberikan. Menimpa anotasi yang ada jika anotasi dengan nama yang ditentukan sudah ada dengan yang sama atau lebih rendah ConfigurationSource.

[System.Diagnostics.DebuggerStepThrough]
Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionAnnotatableBuilder IConventionAnnotatableBuilder.HasAnnotation(string name, object value, bool fromDataAnnotation);
[System.Diagnostics.DebuggerStepThrough]
Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionAnnotatableBuilder? IConventionAnnotatableBuilder.HasAnnotation(string name, object? value, bool fromDataAnnotation);
[<System.Diagnostics.DebuggerStepThrough>]
abstract member Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionAnnotatableBuilder.HasAnnotation : string * obj * bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionAnnotatableBuilder
override this.Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionAnnotatableBuilder.HasAnnotation : string * obj * bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionAnnotatableBuilder
Function HasAnnotation (name As String, value As Object, fromDataAnnotation As Boolean) As IConventionAnnotatableBuilder Implements IConventionAnnotatableBuilder.HasAnnotation

Parameter

name
String

Nama anotasi yang akan ditetapkan.

value
Object

Nilai yang akan disimpan dalam anotasi.

fromDataAnnotation
Boolean

Menunjukkan apakah konfigurasi ditentukan menggunakan anotasi data.

Mengembalikan

Untuk IConventionAnnotatableBuilder melanjutkan konfigurasi jika anotasi diatur, null jika tidak.

Penerapan

Atribut

Berlaku untuk