I apologize for syntax errors, this is my simple explanation of the problem.
I've setup my dbml file with a relationship between Customers and Orders on CustomerId. I'm trying to return all orders for a customer that are less than $10.
Customer customer = context.Customers.FirstOrDefault(c => c.Id == 123);
IEnumerable<Order> orders = customer.Orders.Where(o => o.Total < 10);
This takes for ever because when orders gets enumerated, the sql generated ignores the where clause, pulls 1000s of records, and then in memory, filters out the orders based on the where clause.
How do I set this up so it will generate a query that filters orders at the server?