1: //Fill the data source
2: var products = new List<Product>
3: {
4: new Product{ProductID="P01",ProductName="Amaryl"},
5: new Product {ProductID="P02", ProductName="acetaminophen"}
6: };
7:
8: var pricingRules = new List<PricingRule>
9: {
10: new PricingRule {RuleID="R_1", RuleType="Free goods"},
11: new PricingRule {RuleID="R_2", RuleType="Discount"},
12: new PricingRule {RuleID="R_3", RuleType="Discount"}
13: };
14:
15: //cross join query
16: var crossJoin = from p in products
17: from r in pricingRules
18: select new { ProductID = p.ProductID, RuleID = r.RuleID };