Updatee Deleteable.Wherecolumn

This commit is contained in:
sunkaixuan
2023-06-20 18:58:53 +08:00
parent 0d64e56562
commit d8ff25b415

View File

@@ -184,9 +184,13 @@ namespace SqlSugar
{ {
andString.AppendFormat("\"{0}\"={1} ", primaryField.ToLower(), new PostgreSQLExpressionContext().GetValue(entityValue)); andString.AppendFormat("\"{0}\"={1} ", primaryField.ToLower(), new PostgreSQLExpressionContext().GetValue(entityValue));
} }
else if (this.Context.CurrentConnectionConfig.DbType == DbType.SqlServer && entityValue != null && UtilMethods.GetUnderType(entityValue.GetType()) == UtilConstants.DateType) //else if (this.Context.CurrentConnectionConfig.DbType == DbType.SqlServer && entityValue != null && UtilMethods.GetUnderType(entityValue.GetType()) == UtilConstants.DateType)
//{
// andString.AppendFormat("[{0}]={1} ", primaryField, $"'{entityValue.ObjToDate().ToString("yyyy-MM-dd HH:mm:ss.fff")}'");
//}
else if (entityValue != null && UtilMethods.GetUnderType(entityValue.GetType()) == UtilConstants.DateType)
{ {
andString.AppendFormat("\"{0}\"={1} ", primaryField, $"'{entityValue.ObjToDate().ToString("yyyy-MM-dd HH:mm:ss.fff")}'"); andString.AppendFormat("{0}={1} ",this.SqlBuilder.GetTranslationColumnName(primaryField), $"'{entityValue.ObjToDate().ToString("yyyy-MM-dd HH:mm:ss.fff")}'");
} }
else else
{ {