MergeChangesetInto Method

Overview

The MergeChangesetInto method merges outbound changes from an observable data set into an existing target data set. This method is useful when you already have a target IDataSet instance created for a service request, and you want to populate it with the user’s pending changes from the UI.

Internally, the method builds an outbound changeset by calling CreateChangeset on the observable data set, and then merges that changeset into the provided target data set using MergeWith.

Declaration

/// <summary>
/// Merges outbound changes from observable dataset into an existing target dataset.
/// Useful if you already created a dataset instance for a service request.
/// </summary>
/// <param name="observableDataSet">Observable data set</param>
/// <param name="targetDataSet">Target dataset to receive changes</param>
/// <param name="mergeOptions">Merge options</param>
public static void MergeChangesetInto(this IObservableDataSet? observableDataSet, IDataSet? targetDataSet, IMergeOptions? mergeOptions = null)

Namespace and Assembly

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

Usage Example

// 1. User edits data in an observable data set (UI-bound)
IObservableDataSet observableDataSet = ...;

// 2. Service request object already has a target data set instance
IDataSet requestDataSet = DataSetFactory.CreateDataSet();

// 3. Merge user's outbound changes into the request data set
observableDataSet.MergeChangesetInto(requestDataSet);

// 4. requestDataSet now contains the same outbound changeset rows that would be produced by observableDataSet.CreateChangeset()

Notes

 

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.