What technology are you using, Entity Framework or Linq to SQL?
Please show the schema of the tables involved in the query.
On the exception you are getting please also include the inner exception, that one is generally more
descriptive of the error.
If you are using Linq to SQL try this query out as long as bodyTypesFilter and v.BodyType are of the
same data type.
var categoryGroups = repository.Categories(
a => a.Vehicles
.Where(v => bodyTypesFilter.Contains(v.BodyType))
.Count() > 0);
If a post answers your question, please click "Mark As Answer" on that post and "Mark as Helpful".
NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects
and unknown namespaces.