diff --git a/source/Nevermore.IntegrationTests/QueryableIntegrationFixture.cs b/source/Nevermore.IntegrationTests/QueryableIntegrationFixture.cs index 77413406..794c0c91 100644 --- a/source/Nevermore.IntegrationTests/QueryableIntegrationFixture.cs +++ b/source/Nevermore.IntegrationTests/QueryableIntegrationFixture.cs @@ -1364,5 +1364,16 @@ public async Task ToListAsync() customers.Select(c => c.LastName).Should().BeEquivalentTo("Apple"); } + + [Test] + public async Task UnsupportedMethod_ShouldThrowNotSupportedException() + { + using var t = Store.BeginTransaction(); + + var runQueryWithUnsupportedMethod = + async () => _ = await t.Queryable().Prepend(new()).ToListAsync(); + + await runQueryWithUnsupportedMethod.Should().ThrowAsync(); + } } } \ No newline at end of file diff --git a/source/Nevermore/Advanced/Queryable/QueryTranslator.cs b/source/Nevermore/Advanced/Queryable/QueryTranslator.cs index 63813ddd..3cb4f97d 100644 --- a/source/Nevermore/Advanced/Queryable/QueryTranslator.cs +++ b/source/Nevermore/Advanced/Queryable/QueryTranslator.cs @@ -183,7 +183,7 @@ protected override Expression VisitMethodCall(MethodCallExpression node) return node; } default: - throw new NotSupportedException(); + throw new NotSupportedException($"Specified method is not supported: {methodInfo}"); } }