Update .net core project

This commit is contained in:
sunkaixuan
2022-07-09 02:52:45 +08:00
parent b1fb0cee94
commit ad1a5628b9
3 changed files with 26 additions and 2 deletions

View File

@@ -66,6 +66,18 @@ namespace SqlSugar
return thisValue == equalValue;
}
}
public static string ObjToString(this object thisValue,Func<DateTime,string> formatTime)
{
if (formatTime != null&&thisValue is DateTime)
{
var dt = Convert.ToDateTime(thisValue);
return formatTime(dt);
}
else
{
return thisValue.ObjToString();
}
}
public static string ObjToString(this object thisValue)
{
if (thisValue != null) return thisValue.ToString().Trim();