mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-19 20:38:16 +08:00
- 修复 本地区域化后 ToSql 产生的错误,比如数字可能生成 SQL 为:100,000;
This commit is contained in:
@ -11,6 +11,7 @@ using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using FreeSql.DataAnnotations;
|
||||
using System.Threading;
|
||||
using System.Globalization;
|
||||
|
||||
namespace FreeSql.Internal
|
||||
{
|
||||
@ -1501,7 +1502,8 @@ namespace FreeSql.Internal
|
||||
mapType ?? mapColumn?.Attribute.MapType ?? obj?.GetType(), mapType == null ? obj : Utils.GetDataReaderValue(mapType, obj));
|
||||
return _common.QuoteParamterName(paramName);
|
||||
}
|
||||
return string.Concat(_ado.AddslashesProcessParam(obj, mapType, mapColumn));
|
||||
return string.Format(CultureInfo.InvariantCulture, "{0}", _ado.AddslashesProcessParam(obj, mapType, mapColumn));
|
||||
//return string.Concat(_ado.AddslashesProcessParam(obj, mapType, mapColumn));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2,6 +2,7 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Globalization;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
@ -22,7 +23,7 @@ namespace FreeSql.Internal.CommonProvider
|
||||
.Replace(filter, $" IS {{{a}}}");
|
||||
nparms[a] = AddslashesProcessParam(parms[a], null, null);
|
||||
}
|
||||
try { string ret = string.Format(filter, nparms); return ret; } catch { return filter; }
|
||||
try { string ret = string.Format(CultureInfo.InvariantCulture, filter, nparms); return ret; } catch { return filter; }
|
||||
}
|
||||
static ConcurrentDictionary<int, Regex> _dicAddslashesReplaceIsNull = new ConcurrentDictionary<int, Regex>();
|
||||
|
||||
|
Reference in New Issue
Block a user