I\'m just reviewing some of my old code (have some spare time), and I noticed a rather lengthy switch statement. Due to gaining new knowledge, I have since refactored it in
This approach is excellent.
I use it with more than just Action. It's also quite effective for filters and selectors. Something like:
Action
var filters = new Dictionary>() { // ... }; var query = entities.Where(filters["X"]);