I am using System.Linq.Dynamic to group columns using linq dynamically and need to perform
How can I SUM a column i.e.(Sum(Deposits)). User will select table and columns at runtime.
Ex: The above table has Territory, State, BankName, Year, QuarterFromMainT
Assume user has selected these columns for grouping (Territory, State, BankName) and Now wants to sum a Column ex:Deposits. How can I do this? Because only ASEnumerable and AsQueryable only has sum. We need to perform groupby and sum
Click here for further clarification and My Code is:
here t1 is table and qfields is a list which contains grouping columns.
How can use linq to Sum a column after groupby?