Now, as you can see the column ID has id=2 and id=4 repeated. Instead of uploading this as 7 separate transactions to the queues, the id values which are repeated should be uploaded as one single transaction. So the rows containing ID=2 and 4 should be uploaded as a single queue item(maybe comma separated values for the column containing different data).
Is this even possible to achieve? How can we do this?
You need to identify the similar rows then you can do row.itemarray to get the values of that row as array and then use string.join(“,”,array) to join the values with comma separation
then all the identified rows needs to be appended again using any other separator and then add it to the queue
TableList | List(Of DataTable) =
(From d in YourDataTableVar.AsEnumerable()
Group d by k=d("ID").toString.Trim into grp=Group
Select t = grp.CopyToDataTable).toList
Then loop with a for each (not for each row) over TableList
e.g. create csv data or any other represenation for the current looped datatable and use it for the WorkQueueItem creation