Leggi in inglese

Condividi tramite


ChangeAction Enumerazione

Definizione

Descrive il tipo di modifica che subirà l'entità quando le modifiche verranno inviate al database.

C#
public enum ChangeAction
Ereditarietà
ChangeAction

Campi

Nome Valore Descrizione
Delete 1

L'entità verrà eliminata.

Insert 2

L'entità verrà inserita.

None 0

L'entità non verrà inviata.

Update 3

L'entità verrà aggiornata.

Esempio

C#
void OnValidate(ChangeAction action)
{
    if (action == ChangeAction.Insert)
    {
        Console.WriteLine("Notify billing office.");
    }
}

Commenti

Usare con OnValidate() in LINQ to SQL applicazioni per specificare o omettere la convalida in base al tipo di modifica da inviare.

Si applica a

Prodotto Versioni
.NET Framework 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1