Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Product
- {
- public int ProductID { get; set; }
- public string ProductName { get; set; }
- public string Category { get; set; }
- public decimal UnitPrice { get; set; }
- public int UnitsInStock { get; set; }
- }
- public class Order
- {
- public int OrderID { get; set; }
- public DateTime OrderDate { get; set; }
- public decimal Total { get; set; }
- }
- var customers = (from c in dataSource.Customers
- from o in c.Orders
- where o.Total > value
- select c).Distinct();
- var customers = dataSource.Customers.Select(c => c.Orders
- .Where(o => o.Total > value))
- .Distinct();
Add Comment
Please, Sign In to add comment