I have some code in a RODA service on the server side to delete rows from a table that must execute the businessprocessor rules
My code works but I achieve it by fetching the data from the DB.
Is there a way to achive this without the DB fetch?
This is my code now
var deltas = new List<Delta>();
var dataTable = DB2RemObjectsUtil.GetDataTableFromROBinary(tabledata, TableName);
foreach (DataRow row in dataTable.Rows)
{
int pk = (int)row[KeyFieldName];
if (deleteList.ContainsKey(pk))
{
row.Delete();
var delta = new Delta(dataTable);
delta.Add(row);
deltas.Add(delta);
}
}
using (var dataAdapter=service.GetDataAdapter())
{
dataAdapter.Update(deltas.ToArray());
}