How to combine conditions dynamically?
问题 This question is an enhancement to the already answered question How to apply multiple filter conditions (simultaneously) on a list? In the above mentioned question we have a method that applied AND operator on all the specifications. This is achieved by using LINQ All operator on the specifications. public static List<Product> GetProductsUisngAndFilters(List<Product> productList, List<Specification<Product>> productSpecifications) { return productList.Where(p => productSpecifications.All(ps