mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-06-28 13:34:32 +08:00
Synchronization code
This commit is contained in:
parent
611964b051
commit
9503fb837d
@ -428,6 +428,21 @@ namespace SqlSugar
|
|||||||
GetDbColumnIndex++;
|
GetDbColumnIndex++;
|
||||||
return pname;
|
return pname;
|
||||||
}
|
}
|
||||||
|
else if (columnInfo.PropertyType != null && columnInfo.PropertyType.Name == "DateOnly")
|
||||||
|
{
|
||||||
|
var timeSpan = UtilMethods.DateOnlyToDateTime(columnInfo.Value);
|
||||||
|
var pname = Builder.SqlParameterKeyWord + columnInfo.DbColumnName + "_ts" + GetDbColumnIndex;
|
||||||
|
if (timeSpan == null)
|
||||||
|
{
|
||||||
|
this.Parameters.Add(new SugarParameter(pname, null) { DbType = System.Data.DbType.Date });
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
this.Parameters.Add(new SugarParameter(pname, Convert.ToDateTime(timeSpan)));
|
||||||
|
}
|
||||||
|
GetDbColumnIndex++;
|
||||||
|
return pname;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return name + "";
|
return name + "";
|
||||||
|
Loading…
Reference in New Issue
Block a user