Update Globalization (SqlServer)

This commit is contained in:
sunkaixuan 2025-01-12 13:52:42 +08:00
parent ab2101fb3a
commit 5fb5d38039
2 changed files with 7 additions and 1 deletions

View File

@ -1,5 +1,6 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Globalization;
using System.Linq; using System.Linq;
using System.Linq.Expressions; using System.Linq.Expressions;
using System.Text; using System.Text;
@ -425,6 +426,10 @@ namespace SqlSugar
} }
else if (UtilMethods.IsNumber(type.Name)) else if (UtilMethods.IsNumber(type.Name))
{ {
if (value is decimal v)
{
return v.ToString(UtilConstants.EnCultureInfo);
}
if (value.ObjToString().Contains(",")) if (value.ObjToString().Contains(","))
{ {
return $"'{value}'"; return $"'{value}'";

View File

@ -1,6 +1,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Dynamic; using System.Dynamic;
using System.Globalization;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
namespace SqlSugar namespace SqlSugar
@ -62,7 +63,7 @@ namespace SqlSugar
typeof(short), typeof(short),
typeof(ushort), typeof(ushort),
}; };
internal static CultureInfo EnCultureInfo = new CultureInfo("en");
internal static string[] DateTypeStringList = new string[] internal static string[] DateTypeStringList = new string[]
{ {