Synchronization code

This commit is contained in:
sunkaixuan 2023-02-20 22:01:18 +08:00
parent 671567d9a9
commit ad799406ec
2 changed files with 5 additions and 1 deletions

View File

@ -44,7 +44,7 @@ namespace SqlSugar
FieldName = item.LeftEntityColumn.DbColumnName,
ConditionalType = ConditionalType.Equal,
FieldValue = item.RightEntityColumn.PropertyInfo.GetValue(model).ObjToString(),
CSharpTypeName = item.RightEntityColumn.PropertyInfo.PropertyType.Name
CSharpTypeName =UtilMethods.GetUnderType(item.RightEntityColumn.PropertyInfo.PropertyType).Name
}));
i++;
}

View File

@ -782,6 +782,10 @@ namespace SqlSugar
CSharpTypeName = ctypename,
FieldValue = value
};
if (item.FieldValue == string.Empty && item.CSharpTypeName.HasValue() && !item.CSharpTypeName.EqualCase("string"))
{
return null;
}
if (item.CSharpTypeName.EqualCase(UtilConstants.DecType.Name))
{
return Convert.ToDecimal(item.FieldValue);