Synchronization code

This commit is contained in:
sunkaixuan
2024-07-17 20:56:11 +08:00
parent 9817d360df
commit f905afdccd
3 changed files with 20 additions and 2 deletions

View File

@@ -165,6 +165,13 @@ namespace SqlSugar
{
setValue = null;
}
if (item.UnderType == UtilConstants.GuidType&& setValue is string)
{
if (setValue != null)
{
setValue = Guid.Parse(setValue+"");
}
}
item.PropertyInfo.SetValue(parentObj, setValue);
}
}

View File

@@ -17,11 +17,22 @@ namespace SqlSugar
internal string SugarColumns = "SugarColumns";
internal string SugarErrorMessage = "SugarErrorMessage";
internal List<DataRow> dbDataList = new List<DataRow>();
internal Func<DateTime, string> formatTime;
List<KeyValuePair<StorageType, Func<DataRow, bool>,string>> whereFuncs = new List<KeyValuePair<StorageType, Func<DataRow, bool>,string>>();
public StorageableDataTable WhereColumns(string name)
{
return WhereColumns(new string[] { name});
}
public StorageableDataTable WhereColumns(string name, Func<DateTime, string> formatTime)
{
this.formatTime = formatTime;
return WhereColumns(new string[] { name });
}
public StorageableDataTable WhereColumns(string [] names, Func<DateTime, string> formatTime)
{
this.formatTime = formatTime;
return WhereColumns(names);
}
public StorageableDataTable WhereColumns(string[] names)
{
this.Columns = names;
@@ -180,7 +191,7 @@ namespace SqlSugar
{
FieldName = name,
ConditionalType = ConditionalType.Equal,
FieldValue = value + "",
FieldValue = value.ObjToString(this.formatTime),
CSharpTypeName=value?.GetType()?.Name
}));
++i;

View File

@@ -90,7 +90,7 @@ namespace SqlSugar
}
else
{
return thisValue.ObjToStringNoTrim();
return thisValue+string.Empty;
}
}
public static string ObjToString(this object thisValue)