diff --git a/Src/Asp.NetCore2/SqlSugar/ExpressionsToSql/ResolveItems/BaseResolve_Append.cs b/Src/Asp.NetCore2/SqlSugar/ExpressionsToSql/ResolveItems/BaseResolve_Append.cs index bb6c56aca..9cfa036f0 100644 --- a/Src/Asp.NetCore2/SqlSugar/ExpressionsToSql/ResolveItems/BaseResolve_Append.cs +++ b/Src/Asp.NetCore2/SqlSugar/ExpressionsToSql/ResolveItems/BaseResolve_Append.cs @@ -179,7 +179,12 @@ namespace SqlSugar } else { - this.Context.Parameters.Add(new SugarParameter(appendValue, value)); + var p = new SugarParameter(appendValue, value); + if (p.DbType == System.Data.DbType.String && this.Context?.SugarContext?.Context?.CurrentConnectionConfig?.MoreSettings?.DisableNvarchar == true) + { + p.DbType = System.Data.DbType.AnsiString; + } + this.Context.Parameters.Add(p); } } else