DoPostSaveMerge Extension Method

Overview

Merges a post-save response (returned by the server after applying a changeset) into the current observable data set. This is the merge mode you typically call right after a successful Save:

The method clears observableMergeOptions.ObservableDataSetMergeResult before performing the merge.

Declaration

/// <summary>
/// Merges a post-save response (refreshed data set returned by the server after applying a changeset) into the current
/// observable data set. This is the merge mode you typically call right after a successful Save
/// </summary>
/// <param name="observableDataSet">Observable data set</param>
/// <param name="refreshedDataSet">Refreshed data set</param>
/// <param name="observableMergeOptions">Observable merge options</param>
public static void DoPostSaveMerge(this IObservableDataSet? observableDataSet, IDataSet refreshedDataSet, IObservableMergeOptions observableMergeOptions)

Namespace and Assembly

Namespace: PocoDataSet.ObservableExtensions
Assembly: PocoDataSet.ObservableExtensions.dll

Usage Example

// 1. Assuming observable data set is used for UI binding
IObservableDataSet boundObservableDataSet = new ObservableDataSet();

// The following line is a pseudo-code example of how UI can be bound to the observable data set.
// The actual binding code depends on the UI framework and is not part of POCO DataSet.
somePage.DataContext = boundObservableDataSet;

// 2. UI edits data and sends a changeset to the server.
// After Save, server returns post-save response with identity keys, row versions, computed columns, etc.
// Say, you got the post-save response from the server as IDataSet into postSaveResponseFromServer variable:
IDataSet postSaveResponseFromServer = ...

// 3. Merge the post-save response back to the observable data set by calling DoPostSaveMerge method to update the UI baseline and get merge results.
IObservableMergeOptions options = new ObservableMergeOptions();
boundObservableDataSet.DoPostSaveMerge(postSaveResponseFromServer, options);

 

Table of Content POCO DataSet Observable Data Set Members

 


Business Process Programming in .Net
© 2004–2026 Laskarzhevsky Software Inc.
Unless otherwise noted, the content of this website is licensed under the Creative Commons Attribution 4.0 International License (CC BY 4.0).
Code examples are provided under the MIT License.
You are free to share and adapt the material provided that appropriate credit is given and any modifications are clearly indicated.
The information provided on this website is for educational purposes only.
The author and publisher make no warranties regarding the completeness or suitability of the information and are not responsible for any damages resulting from its use.