I recently started exploring the world of LINQ and I have to say, it has positively impacted my work. Tasks that usually take close to an hour to finish executing now takes less than a second to get done, thanks to LINQ query.
But there are times when I get stuck, which is when I rely on this great community of ours for solutions.
Here’s an example of the task I wish to achieve through LINQ:
You have a datatable**(dt_raw)** with columns “ID”, “Name”, “Department” and “Working Hours” and the ID column is not unique, i.e.,
ID Name Department Working Hours
1 Timmy IT 11
1 Timmy Accounts 9
2 Anthony IT 8
And you wish to calculate the total working hours without loading certain headers(Department in this case) for each employee like so:
ID Name Working Hours
1 Timmy 20
2 Anthony 8
I know how to achieve this result, but I wish to do so with a single Assign Activity(with LINQ) and assign the result to a new datatable**(dt_result)**, and was hoping if anyone here could help me with this.
Thanks in advance!