Q:

LINQ Query - Where has child items

I'm using Entity Framework with a relational SQL Database. For example sake, lets say i've got two tables:
Customers
Invoices

Customers are a one to many relationship with Invoices, however not every customer has an invoice.
I'd like to do a query that will get any Customers that have at least one invoice. Like:
Dim queryCustomersWithInvoices = From rows in context.customers
                                 Where rows.has(Invoices)

The Where statement is the problem, the syntax is wrong, it's just expressing my intent.

A:

Assuming you have an Invoices property on the customer ...
Where rows.Invoices.Any()

should work.

