I'm trying to filter entities based on a collection of child entities. Here are my entities (EF POCO's):
public class Customer
{
public int Id { get; set; }
public string Name { get; set; }
public ICollection<Order> Orders { get; set; }
}
public class Order
{
public int Id { get; set; }
public string Description { get; set; }
}
Using Breeze js I want to return all customers where any Order.Description contains the word 'foo'. I imagined the query to look similar to this:
query = entityQuery.from('Customers')
.where("Orders.Description", "contains", "foo");
But of course that won't work. Any ideas?