ChangeAction Enumeration

ChangeAction Enumeration

 

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

Namespace:   System.Data.Linq
Assembly:  System.Data.Linq (in System.Data.Linq.dll)

public enum ChangeAction

Member nameDescription
Delete

The entity will be deleted.

Insert

The entity will be inserted.

None

The entity will not be submitted.

Update

The entity will be updated.

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

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

.NET Framework
Available since 3.5
Windows Phone Silverlight
Available since 7.1
Return to top
Show:
© 2016 Microsoft