Last active
December 24, 2015 23:09
-
-
Save beachandbytes/6878518 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var newResult = (from client in ctx.Audit().Where(z => batches.Contains(z.BatchID) || batches.Count == 0) | |
group client by new | |
{ | |
client.BatchID, | |
client.PrevBatchID, | |
client.BatchNo , | |
client.PrevBatchNo , | |
} into clientGroup | |
select new Clients | |
{ | |
BatchID = clientGroup.Key.BatchID, | |
PrevBatchID = clientGroup.Key.PrevBatchID, | |
BatchNo = clientGroup.Key.BatchNo, | |
PrevBatchNo = clientGroup.Key.PrevBatchNo, | |
EmployeeList = (from employee in clientGroup | |
select new Employee | |
{ | |
Id = employee.ID, | |
Name = employee.Name, | |
Amt = employee.Amt | |
}).ToList() | |
}).ToList(); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment