public void Non_expression_embedded_static_method_throws() { using (var context = new SimpleModelContext()) { var products = context.Products .Where(p => p.Id == StaticExpressions.NonExpressionMethod()); Assert.Throws <NotSupportedException>(() => products.ToList()); } }