mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-18 17:48:11 +08:00
Update utils method
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
<package >
|
||||
<metadata>
|
||||
<id>SqlSugarCore</id>
|
||||
<version>5.1.4.127</version>
|
||||
<version>5.1.4.128-preview03</version>
|
||||
<authors>sunkaixuan</authors>
|
||||
<owners>果糖大数据科技</owners>
|
||||
<licenseUrl>http://www.apache.org/licenses/LICENSE-2.0.html</licenseUrl>
|
||||
|
@@ -1384,6 +1384,10 @@ namespace SqlSugar
|
||||
{
|
||||
result = result.Replace(item.ParameterName, item.Value.ObjToString());
|
||||
}
|
||||
else if (item.Value is DateTime&&connectionConfig.DbType==DbType.SqlServer)
|
||||
{
|
||||
result = result.Replace(item.ParameterName, "CAST('" + item.Value.ObjToDate().ToString("yyyy-MM-dd HH:mm:ss.fff") + "' AS DATETIME)");
|
||||
}
|
||||
else if (item.Value is DateTime)
|
||||
{
|
||||
result = result.Replace(item.ParameterName, "'"+item.Value.ObjToDate().ToString("yyyy-MM-dd HH:mm:ss.fff")+"'");
|
||||
|
Reference in New Issue
Block a user