CosmosValueGenerationConvention Klasa

Definicja

Konwencja, która konfiguruje generowanie wartości jako OnAdd właściwości, które są częścią klucza podstawowego, a nie część żadnych kluczy obcych lub zostały skonfigurowane do posiadania wartości domyślnej bazy danych.

public class CosmosValueGenerationConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.ValueGenerationConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeAnnotationChangedConvention
type CosmosValueGenerationConvention = class
    inherit ValueGenerationConvention
    interface IEntityTypeAnnotationChangedConvention
    interface IConvention
Public Class CosmosValueGenerationConvention
Inherits ValueGenerationConvention
Implements IEntityTypeAnnotationChangedConvention
Dziedziczenie
CosmosValueGenerationConvention
Implementuje

Uwagi

Aby uzyskać więcej informacji i przykładów, zobacz Konwencje tworzenia modeli i generowanie wartości platformy EF Core .

Konstruktory

CosmosValueGenerationConvention(ProviderConventionSetBuilderDependencies)

Tworzy nowe wystąpienie klasy CosmosValueGenerationConvention.

Właściwości

Dependencies

Zależności dla tej usługi.

(Odziedziczone po ValueGenerationConvention)

Metody

GetValueGenerated(IConventionProperty)

Zwraca strategię generowania wartości magazynu, która ma zostać ustawiona dla danej właściwości.

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

Wywoływana po zmianie adnotacji w typie jednostki.

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

Wywoływane po zmianie typu podstawowego typu jednostki.

(Odziedziczone po ValueGenerationConvention)
ProcessEntityTypePrimaryKeyChanged(IConventionEntityTypeBuilder, IConventionKey, IConventionKey, IConventionContext<IConventionKey>)

Wywoływana po zmianie klucza podstawowego dla typu jednostki.

(Odziedziczone po ValueGenerationConvention)
ProcessForeignKeyAdded(IConventionForeignKeyBuilder, IConventionContext<IConventionForeignKeyBuilder>)

Wywoływane po dodaniu klucza obcego do typu jednostki.

(Odziedziczone po ValueGenerationConvention)
ProcessForeignKeyAdded(IConventionRelationshipBuilder, IConventionContext<IConventionRelationshipBuilder>)

Wywoływane po dodaniu klucza obcego do typu jednostki.

(Odziedziczone po ValueGenerationConvention)
ProcessForeignKeyOwnershipChanged(IConventionForeignKeyBuilder, IConventionContext<Nullable<Boolean>>)

Wywoływana po zmianie wartości własności klucza obcego.

(Odziedziczone po ValueGenerationConvention)
ProcessForeignKeyPropertiesChanged(IConventionForeignKeyBuilder, IReadOnlyList<IConventionProperty>, IConventionKey, IConventionContext<IReadOnlyList<IConventionProperty>>)

Wywoływane po zmianie właściwości klucza obcego lub klucza głównego.

(Odziedziczone po ValueGenerationConvention)
ProcessForeignKeyPropertiesChanged(IConventionRelationshipBuilder, IReadOnlyList<IConventionProperty>, IConventionKey, IConventionContext<IConventionRelationshipBuilder>)

Wywoływane po zmianie właściwości klucza obcego lub klucza głównego.

(Odziedziczone po ValueGenerationConvention)
ProcessForeignKeyRemoved(IConventionEntityTypeBuilder, IConventionForeignKey, IConventionContext<IConventionForeignKey>)

Wywoływane po usunięciu klucza obcego.

(Odziedziczone po ValueGenerationConvention)

Dotyczy