✅ Passing lambda expressions as function parameters - can it be done?
So i've got a bunch of LINQ stuff like this:
is it possible to take the lambda expression (predicate?), bind it to a var and then pass it in like so:
context - I'm trying to make a function that lets you filter on the employee's "Department" and/or "Role" and i'm trying to figure out if I can just pass a different expression into Where()
is it possible to take the lambda expression (predicate?), bind it to a var and then pass it in like so:
context - I'm trying to make a function that lets you filter on the employee's "Department" and/or "Role" and i'm trying to figure out if I can just pass a different expression into Where()
