RelationalValueGenerationConvention Sınıf

Tanım

OnAddBirincil anahtarın parçası olan ve herhangi bir yabancı anahtarın parçası olmayan veya veritabanı varsayılan değerine sahip olacak şekilde yapılandırılmış olan özellikler için depo değeri oluşturmayı yapılandıran bir kural. Ayrıca OnAddOrUpdate , özellikleri hesaplanan sütunlar olarak yapılandırılmış gibi yapılandırır.

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
Devralma
RelationalValueGenerationConvention
Türetilmiş
Uygulamalar

Açıklamalar

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

Oluşturucular

RelationalValueGenerationConvention(ProviderConventionSetBuilderDependencies, RelationalConventionSetBuilderDependencies)

RelationalValueGenerationConvention öğesinin yeni bir örneğini oluşturur.

Özellikler

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

GetValueGenerated(IConventionProperty)

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

GetValueGenerated(IProperty)

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

GetValueGenerated(IProperty, StoreObjectIdentifier)

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

GetValueGenerated(IReadOnlyProperty, StoreObjectIdentifier)

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

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

Bir varlık türü üzerinde bir 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ştiğinde ç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 için 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 özellik üzerinde bir ek açıklama değiştirildikten sonra çağırılır.

Şunlara uygulanır