Understanding the LINQ nested grouping example

Here’s an explanation of how the default example for LINQ nested grouping actually works. The usual example for nested grouping looks like this: The objective of this statement is to first group-by students into faculties and then in each faculty create subgroupings of students by their DebtCategory. So how does this actually work and whats […]

Read more
Dynamic predicates in C# using PredicateBuilder

One of the challenges I frequently encounter, is having to translate the arbitrary criteria in a testcase to LINQ selection predicates. Take the following very simple example testcase: In this very small example, you already see that the C# code will need to determine at run-time IF an invoice exists AND MAYBE what the contents […]

Read more