Given this query and an empty collection (eventFilter.CategoryIds) ...
.Where(r => eventFilter.CategoryIds.Contains(r.DataObjectCategory.CategoryId))
...I get the exception below.
I believe an empty "in" expression in SQL is not valid but as a .NET dev I'd except nothing to be returned (i.e. MindScape resolves the test to false) rather than LightSpeed expoloding.
[ArgumentException: values must have at least one element
Parameter name: values]
Mindscape.LightSpeed.Querying.PathExpression.In(Object[] values) +325
Mindscape.LightSpeed.Linq.Translations.CollectionContainsBase.Apply(QueryExpression applyTo, DataProvider provider, QueryExpression[] arguments) +332
Mindscape.LightSpeed.Linq.Sqo.CriteriaSqo.ExtractCriteria(LinqQueryPlanExpression plan, Expression expression) +60
Mindscape.LightSpeed.Linq.Sqo.CriteriaSqo.ExtractCriteria(LinqQueryPlanExpression plan, Expression expression) +60
Mindscape.LightSpeed.Linq.Sqo.CriteriaSqo.ExtractCriteria(LinqQueryPlanExpression plan, Expression expression) +60
Mindscape.LightSpeed.Linq.Sqo.Where.ExtractWhereCriteria(MethodCallExpression expression, LinqQueryPlanExpression plan, GroupResultsPlan groupPlan) +80
Mindscape.LightSpeed.Linq.Sqo.Where.Evaluate(ExpressionVisitor visitor, MethodCallExpression expression) +1274
Mindscape.LightSpeed.Linq.Plan.LinqQueryBuilder.VisitMethodCall(MethodCallExpression exp) +1591
Mindscape.LightSpeed.Linq.Sqo.Select.Evaluate(ExpressionVisitor visitor, MethodCallExpression expression) +389
Mindscape.LightSpeed.Linq.Plan.LinqQueryBuilder.VisitMethodCall(MethodCallExpression exp) +1532
Mindscape.LightSpeed.Linq.Sqo.Join.Evaluate(ExpressionVisitor visitor, MethodCallExpression expression) +114
Mindscape.LightSpeed.Linq.Plan.LinqQueryBuilder.VisitMethodCall(MethodCallExpression exp) +2317
Mindscape.LightSpeed.Linq.Sqo.Join.Evaluate(ExpressionVisitor visitor, MethodCallExpression expression) +114
Mindscape.LightSpeed.Linq.Plan.LinqQueryBuilder.VisitMethodCall(MethodCallExpression exp) +2317
Mindscape.LightSpeed.Linq.Sqo.Where.Evaluate(ExpressionVisitor visitor, MethodCallExpression expression) +78
Mindscape.LightSpeed.Linq.Plan.LinqQueryBuilder.VisitMethodCall(MethodCallExpression exp) +1591
Mindscape.LightSpeed.Linq.Sqo.Select.Evaluate(ExpressionVisitor visitor, MethodCallExpression expression) +389
Mindscape.LightSpeed.Linq.Plan.LinqQueryBuilder.VisitMethodCall(MethodCallExpression exp) +1532
Mindscape.LightSpeed.Linq.Sqo.OrderSqo.Evaluate(ExpressionVisitor visitor, MethodCallExpression expression) +88
Mindscape.LightSpeed.Linq.Plan.LinqQueryBuilder.VisitMethodCall(MethodCallExpression exp) +2199
Mindscape.LightSpeed.Linq.Sqo.CountBase.Evaluate(ExpressionVisitor visitor, MethodCallExpression expression) +69
Mindscape.LightSpeed.Linq.Plan.LinqQueryBuilder.VisitMethodCall(MethodCallExpression exp) +1414
Mindscape.LightSpeed.Linq.LinqQueryProvider.Execute(Expression expression) +66
Mindscape.LightSpeed.Linq.LinqQueryProvider.System.Linq.IQueryProvider.Execute(Expression expression) +9
System.Linq.Queryable.Count(IQueryable`1 source) +352