Edit

Share via


ChangeAction Enum

Definition

Describes the type of change the entity will undergo when changes are submitted to the database.

C#
public enum ChangeAction
Inheritance
ChangeAction

Fields

Name Value Description
None 0

The entity will not be submitted.

Delete 1

The entity will be deleted.

Insert 2

The entity will be inserted.

Update 3

The entity will be updated.

Examples

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

Remarks

Use with OnValidate() in LINQ to SQL applications to specify or omit validation based on the type of change being submitted.

Applies to

Product Versions
.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