diff --git a/Src/Asp.Net/SqlSugar/Abstract/DbMaintenanceProvider/Methods.cs b/Src/Asp.Net/SqlSugar/Abstract/DbMaintenanceProvider/Methods.cs index cc8aef63f..951d6bb16 100644 --- a/Src/Asp.Net/SqlSugar/Abstract/DbMaintenanceProvider/Methods.cs +++ b/Src/Asp.Net/SqlSugar/Abstract/DbMaintenanceProvider/Methods.cs @@ -97,7 +97,8 @@ namespace SqlSugar Check.Exception(!isAny, string.Format("Table {0} does not exist", tableName)); var columns = GetColumnInfosByTableName(tableName); if (columns.IsNullOrEmpty()) return false; - return columns.Any(it => it.IsPrimarykey = true && it.DbColumnName.Equals(columnName, StringComparison.CurrentCultureIgnoreCase)); + var result=columns.Any(it => it.IsPrimarykey == true && it.DbColumnName.Equals(columnName, StringComparison.CurrentCultureIgnoreCase)); + return result; } public virtual bool IsIdentity(string tableName, string columnName) {