I have a Linq
query written in C#. I don't know how to change it so that it works with UiPath
.
The query finds all
AccountNumber in the table and finds the sum of Remainder rows
var afterChange = listDate.GroupBy(account => account.AccountNumber)
.Select(group => new
{
AccountNumber = group.Key,
Сurrency = group.Select(groupElement => groupElement.Сurrency).First(),
Remainder = group.Select(groupElement => groupElement.Remainder).Sum(),
})
.AsEnumerable()
.Select(x => new TableData
{
Remainder = x.Remainder,
AccountNumber = x.AccountNumber,
Сurrency = x.Сurrency
})
.ToList();