From 7ca2434e056cff583afe1c2afd9048c145e68b34 Mon Sep 17 00:00:00 2001 From: sunkaixuan <610262374@qq.com> Date: Tue, 14 Feb 2023 19:36:22 +0800 Subject: [PATCH] Support Json.net JValue --- .../SqlSugar/ExpressionsToSql/Common/SugarParameter.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Src/Asp.Net/SqlSugar/ExpressionsToSql/Common/SugarParameter.cs b/Src/Asp.Net/SqlSugar/ExpressionsToSql/Common/SugarParameter.cs index 3b671adc4..ac7f8806c 100644 --- a/Src/Asp.Net/SqlSugar/ExpressionsToSql/Common/SugarParameter.cs +++ b/Src/Asp.Net/SqlSugar/ExpressionsToSql/Common/SugarParameter.cs @@ -172,6 +172,10 @@ namespace SqlSugar this.DbType = System.Data.DbType.Date; this.Value = UtilMethods.DateOnlyToDateTime(this.Value); } + else if (type?.FullName == "Newtonsoft.Json.Linq.JObject" || type?.FullName == "Newtonsoft.Json.Linq.JArray" || type?.FullName == "Newtonsoft.Json.Linq.JValue") + { + this.Value =this.Value==null?default(string):this.Value.ObjToString() ; + } } public SugarParameter(string name, object value, bool isOutput)