From e1cf703c4bb09266e8b9cf260b7a8c9415907d47 Mon Sep 17 00:00:00 2001 From: Sebastien Ros Date: Thu, 2 May 2024 17:16:24 -0700 Subject: [PATCH] Add generic check --- src/YesSql.Core/Services/DefaultQuery.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/YesSql.Core/Services/DefaultQuery.cs b/src/YesSql.Core/Services/DefaultQuery.cs index da3de18a..04ad5667 100644 --- a/src/YesSql.Core/Services/DefaultQuery.cs +++ b/src/YesSql.Core/Services/DefaultQuery.cs @@ -824,7 +824,7 @@ public void ConvertFragment(IStringBuilder builder, Expression expression) var methodInfo = methodCallExpression.Method; Action action; if (MethodMappings.TryGetValue(methodInfo, out action) - || MethodMappings.TryGetValue(methodInfo.GetGenericMethodDefinition(), out action)) + || (methodInfo.IsGenericMethod && MethodMappings.TryGetValue(methodInfo.GetGenericMethodDefinition(), out action))) { action(this, builder, _dialect, methodCallExpression); }