From 1414493d0b9cc9495464df67d55645183af8cec9 Mon Sep 17 00:00:00 2001 From: sunkaixuan <610262374@qq.com> Date: Fri, 10 May 2019 18:04:21 +0800 Subject: [PATCH] Db.DbMain.IsPrimaryKey BUG --- Src/Asp.Net/SqlSugar/Abstract/DbMaintenanceProvider/Methods.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) {