I want to open a WCF service service that sends new records to the database. Each time an operation is called, it must return a DataSet that includes only rows that have been added to the database since the last operation call.
My question is whether this is possible by serializing the DataSet between calls, and then using the GetChanges () and AcceptChanges () methods.
Those. (pseudo code)
[OperationContract]
public DataSet GetDataSet()
{
DataSet ds = LoadDataSet();
DataSet newDs = GetRecordsFromDatabase();
ds.Merge(newDs, true);
return ds.GetChanges();
}
source
share