Bagikan melalui


RelationalValueGenerationConvention Kelas

Definisi

Konvensi yang mengonfigurasi pembuatan nilai penyimpanan seperti OnAdd pada properti yang merupakan bagian dari kunci primer dan bukan bagian dari kunci asing atau dikonfigurasi untuk memiliki nilai default database. Ini juga mengonfigurasi properti seolah-olah OnAddOrUpdate dikonfigurasi sebagai kolom komputasi.

public class RelationalValueGenerationConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.ValueGenerationConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IPropertyAnnotationChangedConvention
public class RelationalValueGenerationConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.ValueGenerationConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeAnnotationChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IPropertyAnnotationChangedConvention
type RelationalValueGenerationConvention = class
    inherit ValueGenerationConvention
    interface IPropertyAnnotationChangedConvention
    interface IConvention
type RelationalValueGenerationConvention = class
    inherit ValueGenerationConvention
    interface IPropertyAnnotationChangedConvention
    interface IConvention
    interface IEntityTypeAnnotationChangedConvention
Public Class RelationalValueGenerationConvention
Inherits ValueGenerationConvention
Implements IPropertyAnnotationChangedConvention
Public Class RelationalValueGenerationConvention
Inherits ValueGenerationConvention
Implements IEntityTypeAnnotationChangedConvention, IPropertyAnnotationChangedConvention
Warisan
RelationalValueGenerationConvention
Turunan
Penerapan

Keterangan

Lihat Konvensi pembuatan model dan pembuatan nilai EF Core untuk informasi dan contoh selengkapnya.

Konstruktor

RelationalValueGenerationConvention(ProviderConventionSetBuilderDependencies, RelationalConventionSetBuilderDependencies)

Membuat instans baru .RelationalValueGenerationConvention

Properti

Dependencies

Dependensi untuk layanan ini.

(Diperoleh dari ValueGenerationConvention)
RelationalDependencies

Dependensi khusus penyedia relasional untuk layanan ini.

Metode

GetValueGenerated(IConventionProperty)

Mengembalikan strategi pembuatan nilai penyimpanan yang akan diatur untuk properti yang diberikan.

GetValueGenerated(IProperty)

Mengembalikan strategi pembuatan nilai penyimpanan yang akan diatur untuk properti yang diberikan.

GetValueGenerated(IProperty, StoreObjectIdentifier)

Mengembalikan strategi pembuatan nilai penyimpanan yang akan diatur untuk properti yang diberikan.

GetValueGenerated(IReadOnlyProperty, StoreObjectIdentifier)

Mengembalikan strategi pembuatan nilai penyimpanan yang akan diatur untuk properti yang diberikan.

MappingStrategyAllowsValueGeneration(IConventionProperty, String)

Memeriksa apakah strategi pemetaan dan properti memungkinkan pembuatan nilai berdasarkan konvensi atau tidak.

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

Dipanggil setelah anotasi diubah pada jenis entitas.

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

Dipanggil setelah jenis dasar jenis entitas berubah.

(Diperoleh dari ValueGenerationConvention)
ProcessEntityTypePrimaryKeyChanged(IConventionEntityTypeBuilder, IConventionKey, IConventionKey, IConventionContext<IConventionKey>)

Dipanggil setelah kunci primer untuk jenis entitas diubah.

(Diperoleh dari ValueGenerationConvention)
ProcessForeignKeyAdded(IConventionForeignKeyBuilder, IConventionContext<IConventionForeignKeyBuilder>)

Dipanggil setelah kunci asing ditambahkan ke jenis entitas.

(Diperoleh dari ValueGenerationConvention)
ProcessForeignKeyAdded(IConventionRelationshipBuilder, IConventionContext<IConventionRelationshipBuilder>)

Dipanggil setelah kunci asing ditambahkan ke jenis entitas.

(Diperoleh dari ValueGenerationConvention)
ProcessForeignKeyOwnershipChanged(IConventionForeignKeyBuilder, IConventionContext<Nullable<Boolean>>)

Dipanggil setelah nilai kepemilikan untuk kunci asing diubah.

(Diperoleh dari ValueGenerationConvention)
ProcessForeignKeyPropertiesChanged(IConventionForeignKeyBuilder, IReadOnlyList<IConventionProperty>, IConventionKey, IConventionContext<IReadOnlyList<IConventionProperty>>)

Dipanggil setelah properti kunci asing atau kunci utama diubah.

(Diperoleh dari ValueGenerationConvention)
ProcessForeignKeyPropertiesChanged(IConventionRelationshipBuilder, IReadOnlyList<IConventionProperty>, IConventionKey, IConventionContext<IConventionRelationshipBuilder>)

Dipanggil setelah properti kunci asing atau kunci utama diubah.

(Diperoleh dari ValueGenerationConvention)
ProcessForeignKeyRemoved(IConventionEntityTypeBuilder, IConventionForeignKey, IConventionContext<IConventionForeignKey>)

Dipanggil setelah kunci asing dihapus.

(Diperoleh dari ValueGenerationConvention)
ProcessPropertyAnnotationChanged(IConventionPropertyBuilder, String, IConventionAnnotation, IConventionAnnotation, IConventionContext<IConventionAnnotation>)

Dipanggil setelah anotasi diubah pada properti.

Berlaku untuk