DomainDataSource.SubmitChanges Method

WCF RIA Services

[WCF RIA Services Version 1 Service Pack 2 is compatible with either .NET framework 4 or .NET Framework 4.5, and with either Silverlight 4 or Silverlight 5.]

Submits the changes for every Entity in the DomainContext.

Namespace:  System.Windows.Controls
Assembly:  System.Windows.Controls.DomainServices (in System.Windows.Controls.DomainServices.dll)

'Declaration
Public Sub SubmitChanges
'Usage
Dim instance As DomainDataSource

instance.SubmitChanges()

Changes will be submitted for all entities in the DomainContext, including those that were not loaded through this DomainDataSource. This will also commit a pending Add or Edit transaction on the DataView.

The following example shows how to call the SubmitChanges method for a DomainDataSource control named employeeDataSource. This example is part of a larger example in the Walkthrough: Taking a Tour of RIA Services topic.

Private Sub approveSabbatical_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs)
    Dim luckyEmployee As Employee
    luckyEmployee = dataGrid1.SelectedItem
    luckyEmployee.ApproveSabbatical()
    employeeDataSource.SubmitChanges()
End Sub


Show: