Need your help and advise on how to get the output as below using linq query.
simplified query query. Using looping and if command take the process too long. I need to process more than 200 row items.
(From d In dtData.AsEnumerable
Let ik = Regex.Replace(d("invoiceno").toString.Trim,"[A-Za-z]+$","")
Group d By k=ik Into grp=Group
Let sm = grp.Sum(Function (x) CInt(x("Amount").toString.Trim))
Let g = grp.First()
Let ra = New Object(){g(0), g(1), k, g(3), g(5),sm, g(7), g(8)}
Select dtResult.Rows.Add(ra)).CopyToDataTable
ensure: System.Text.RegilarExpressions is added to the imports