Bagikan melalui


NonNullableReferencePropertyConvention Kelas

Definisi

Konvensi yang mengonfigurasi properti jenis yang tidak dapat diubah ke null sesuai kebutuhan.

public class NonNullableReferencePropertyConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.NonNullableConventionBase, Microsoft.EntityFrameworkCore.Metadata.Conventions.IPropertyAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IPropertyFieldChangedConvention
public class NonNullableReferencePropertyConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.NonNullableConventionBase, Microsoft.EntityFrameworkCore.Metadata.Conventions.IComplexPropertyAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IComplexPropertyFieldChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IPropertyAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IPropertyFieldChangedConvention
type NonNullableReferencePropertyConvention = class
    inherit NonNullableConventionBase
    interface IPropertyAddedConvention
    interface IConvention
    interface IPropertyFieldChangedConvention
type NonNullableReferencePropertyConvention = class
    inherit NonNullableConventionBase
    interface IPropertyAddedConvention
    interface IConvention
    interface IPropertyFieldChangedConvention
    interface IComplexPropertyAddedConvention
    interface IComplexPropertyFieldChangedConvention
Public Class NonNullableReferencePropertyConvention
Inherits NonNullableConventionBase
Implements IPropertyAddedConvention, IPropertyFieldChangedConvention
Public Class NonNullableReferencePropertyConvention
Inherits NonNullableConventionBase
Implements IComplexPropertyAddedConvention, IComplexPropertyFieldChangedConvention, IPropertyAddedConvention, IPropertyFieldChangedConvention
Warisan
NonNullableReferencePropertyConvention
Penerapan

Keterangan

Lihat Konvensi pembuatan model untuk informasi dan contoh selengkapnya.

Konstruktor

NonNullableReferencePropertyConvention(ProviderConventionSetBuilderDependencies)

Membuat instans baru .NonNullableReferencePropertyConvention

Properti

Dependencies

Dependensi untuk layanan ini.

(Diperoleh dari NonNullableConventionBase)

Metode

IsNonNullableReferenceType(IConventionModelBuilder, MemberInfo)

Mengembalikan nilai yang menunjukkan apakah jenis anggota adalah tipe referensi yang tidak dapat diubah ke null.

(Diperoleh dari NonNullableConventionBase)
ProcessComplexPropertyAdded(IConventionComplexPropertyBuilder, IConventionContext<IConventionComplexPropertyBuilder>)

Dipanggil setelah properti kompleks ditambahkan ke objek seperti jenis.

ProcessComplexPropertyFieldChanged(IConventionComplexPropertyBuilder, FieldInfo, FieldInfo, IConventionContext<FieldInfo>)

Dipanggil setelah bidang dukungan untuk properti kompleks diubah.

ProcessModelFinalized(IConventionModelBuilder, IConventionContext<IConventionModelBuilder>)

Dipanggil setelah model diselesaikan. Menghapus anotasi status cache yang digunakan oleh konvensi ini.

(Diperoleh dari NonNullableConventionBase)
ProcessModelFinalizing(IConventionModelBuilder, IConventionContext<IConventionModelBuilder>)

Dipanggil ketika model sedang diselesaikan.

(Diperoleh dari NonNullableConventionBase)
ProcessPropertyAdded(IConventionPropertyBuilder, IConventionContext<IConventionPropertyBuilder>)

Dipanggil setelah properti ditambahkan ke jenis entitas.

ProcessPropertyFieldChanged(IConventionPropertyBuilder, FieldInfo, FieldInfo, IConventionContext<FieldInfo>)

Dipanggil setelah bidang dukungan untuk properti diubah.

TryGetNullabilityInfo(IConventionModelBuilder, MemberInfo, NullabilityInfo)

Mengembalikan nilai yang menunjukkan apakah jenis anggota adalah tipe referensi yang tidak dapat diubah ke null.

(Diperoleh dari NonNullableConventionBase)

Berlaku untuk