ChangeAction ChangeAction ChangeAction ChangeAction Enum


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

public enum class ChangeAction
public enum ChangeAction
type ChangeAction = 
Public Enum ChangeAction


Delete Delete Delete Delete 1

The entity will be deleted.

Insert Insert Insert Insert 2

The entity will be inserted.

None None None None 0

The entity will not be submitted.

Update Update Update Update 3

The entity will be updated.


void OnValidate(ChangeAction action)
    if (action == ChangeAction.Insert)
        Console.WriteLine("Notify billing office.");
Public Sub OnValidate(ByVal action As System.Data.Linq.ChangeAction)
    If action = ChangeAction.Insert Then
        Console.WriteLine("Notify billing office.")
    End If
End Sub


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

Applies to