Optimized code

This commit is contained in:
sunkaixuan
2023-06-21 19:33:26 +08:00
parent 4763e580ed
commit 4cf3658c22
2 changed files with 2 additions and 2 deletions

View File

@@ -186,7 +186,7 @@ namespace SqlSugar
}
else if ( entityValue != null &&UtilMethods.IsNumber( UtilMethods.GetUnderType(entityValue.GetType()).Name))
{
andString.AppendFormat("[{0}]={1} ", primaryField, $"{entityValue}");
andString.AppendFormat("{0}={1} ", this.SqlBuilder.GetTranslationColumnName(primaryField), $"{entityValue}");
}
else if (entityValue != null && UtilMethods.GetUnderType(entityValue.GetType()) == UtilConstants.DateType)
{

View File

@@ -186,7 +186,7 @@ namespace SqlSugar
}
else if ( entityValue != null &&UtilMethods.IsNumber( UtilMethods.GetUnderType(entityValue.GetType()).Name))
{
andString.AppendFormat("[{0}]={1} ", primaryField, $"{entityValue}");
andString.AppendFormat("{0}={1} ", this.SqlBuilder.GetTranslationColumnName(primaryField), $"{entityValue}");
}
else if (entityValue != null && UtilMethods.GetUnderType(entityValue.GetType()) == UtilConstants.DateType)
{