Dil

RelationalValueGenerationConvention Sınıf

Tanım

Depolama değeri oluşturmayı, herhangi bir yabancı anahtarın parçası değil birincil anahtarın parçası olan veya veritabanı varsayılan değerine sahip olacak şekilde yapılandırılmış özelliklerde olarak OnAdd yapılandıran bir kural. Ayrıca, özellikleri hesaplanan sütunlar olarak yapılandırılmış gibi OnAddOrUpdate yapılandırılır.

[System.Runtime.CompilerServices.Nullable(0)]
public class RelationalValueGenerationConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.ValueGenerationConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeAnnotationChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IPropertyAnnotationChangedConvention
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
[<System.Runtime.CompilerServices.Nullable(0)>]
type RelationalValueGenerationConvention = class
    inherit ValueGenerationConvention
    interface IPropertyAnnotationChangedConvention
    interface IConvention
    interface IEntityTypeAnnotationChangedConvention
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 IEntityTypeAnnotationChangedConvention, IPropertyAnnotationChangedConvention
Public Class RelationalValueGenerationConvention
Inherits ValueGenerationConvention
Implements IPropertyAnnotationChangedConvention
Devralma
RelationalValueGenerationConvention
Türetilmiş
Özellikler
Uygulamalar

Açıklamalar

Daha fazla bilgi ve örnek için bkz. Model oluşturma kuralları ve EF Core değer oluşturma .

Oluşturucular

Veri Akışı Adı Description
RelationalValueGenerationConvention(ProviderConventionSetBuilderDependencies, RelationalConventionSetBuilderDependencies)

öğesinin yeni bir örneğini RelationalValueGenerationConventionoluşturur.

Özellikler

Veri Akışı Adı Description
Dependencies

Bu hizmet için bağımlılıklar.

(Devralındığı yer: ValueGenerationConvention)
RelationalDependencies

Bu hizmet için ilişkisel sağlayıcıya özgü bağımlılıklar.

Yöntemler

Veri Akışı Adı Description
GetValueGenerated(IConventionProperty)

Verilen özellik için ayarlanacağı depo değeri oluşturma stratejisini döndürür.

GetValueGenerated(IProperty, StoreObjectIdentifier)

Verilen özellik için ayarlanacağı depo değeri oluşturma stratejisini döndürür.

GetValueGenerated(IProperty)

Verilen özellik için ayarlanacağı depo değeri oluşturma stratejisini döndürür.

GetValueGenerated(IReadOnlyProperty, StoreObjectIdentifier)

Verilen özellik için ayarlanacağı depo değeri oluşturma stratejisini döndürür.

MappingStrategyAllowsValueGeneration(IConventionProperty, String)

Eşleme stratejisinin ve özelliğinin kurala göre değer üretmeye izin verip vermediğini denetler.

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

Bir varlık türünde ek açıklama değiştirildikten sonra çağrılır.

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

Bir varlık türünün temel türü değiştikten sonra çağrılır.

(Devralındığı yer: ValueGenerationConvention)
ProcessEntityTypePrimaryKeyChanged(IConventionEntityTypeBuilder, IConventionKey, IConventionKey, IConventionContext<IConventionKey>)

Bir varlık türü için birincil anahtar değiştirildikten sonra çağrılır.

(Devralındığı yer: ValueGenerationConvention)
ProcessForeignKeyAdded(IConventionForeignKeyBuilder, IConventionContext<IConventionForeignKeyBuilder>)

Varlık türüne yabancı anahtar eklendikten sonra çağrılır.

(Devralındığı yer: ValueGenerationConvention)
ProcessForeignKeyAdded(IConventionRelationshipBuilder, IConventionContext<IConventionRelationshipBuilder>)

Varlık türüne yabancı anahtar eklendikten sonra çağrılır.

(Devralındığı yer: ValueGenerationConvention)
ProcessForeignKeyOwnershipChanged(IConventionForeignKeyBuilder, IConventionContext<Nullable<Boolean>>)

Yabancı anahtarın sahiplik değeri değiştirildikten sonra çağrılır.

(Devralındığı yer: ValueGenerationConvention)
ProcessForeignKeyPropertiesChanged(IConventionForeignKeyBuilder, IReadOnlyList<IConventionProperty>, IConventionKey, IConventionContext<IReadOnlyList<IConventionProperty>>)

Yabancı anahtar özellikleri veya asıl anahtar değiştirildikten sonra çağrılır.

(Devralındığı yer: ValueGenerationConvention)
ProcessForeignKeyPropertiesChanged(IConventionRelationshipBuilder, IReadOnlyList<IConventionProperty>, IConventionKey, IConventionContext<IConventionRelationshipBuilder>)

Yabancı anahtar özellikleri veya asıl anahtar değiştirildikten sonra çağrılır.

(Devralındığı yer: ValueGenerationConvention)
ProcessForeignKeyRemoved(IConventionEntityTypeBuilder, IConventionForeignKey, IConventionContext<IConventionForeignKey>)

Yabancı anahtar kaldırıldıktan sonra çağrılır.

(Devralındığı yer: ValueGenerationConvention)
ProcessPropertyAnnotationChanged(IConventionPropertyBuilder, String, IConventionAnnotation, IConventionAnnotation, IConventionContext<IConventionAnnotation>)

Bir özellikte ek açıklama değiştirildikten sonra çağrılır.

Şunlara uygulanır