Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static IEnumerable<Product> GetProformaFormularies(int? productDepartmentId = null, int? productCategoryId = null, IEnumerable<int?> productCategoryIds = null, IEnumerable<string> sections = null) {
- var retList = (from obj in products
- where (productDepartmentId == null || obj.ProductDepartmentId == productDepartmentId) &&
- (productCategoryId == null || obj.ProductCategoryId == productCategoryId) &&
- (productCategoryIds == null || productCategoryIds.Contains(obj.ProductCategoryId)) &&
- (sections == null || sections.Contains(obj.sections))
- select obj).ToList();
- return retList;
- }
- private static List<Product> products;
- public class Product {
- public int ProductDepartmentId, ProductCategoryId;
- public string sections;
- }
Advertisement
Add Comment
Please, Sign In to add comment