Synchronization code

This commit is contained in:
sunkaixuan
2024-07-09 22:50:20 +08:00
parent 4ed0548247
commit 35900da07c
2 changed files with 10 additions and 1 deletions

View File

@@ -849,6 +849,11 @@ namespace SqlSugar
FieldValue = disableQueryWhereColumnRemoveTrim?value.ObjToStringNoTrim() : value.ObjToStringNew(),
CSharpTypeName = column.PropertyInfo.PropertyType.Name
});
if (value == null)
{
data.Value.FieldValue = null;
data.Value.ConditionalType = ConditionalType.EqualNull;
}
if (value is Enum && this.Context.CurrentConnectionConfig?.MoreSettings?.TableEnumIsString != true)
{
data.Value.FieldValue = Convert.ToInt64(value).ObjToString();

View File

@@ -50,6 +50,10 @@ namespace SqlSugar
{
result.Length = 1;
}
if (result.DataType.EqualCase("timestamp")&&this.Context.CurrentConnectionConfig?.MoreSettings?.DatabaseModel == DbType.SqlServer)
{
result.DataType = "datetime";
}
return result;
}