From 1adf9ee6260782d5ed0c9c644eed64023238a152 Mon Sep 17 00:00:00 2001 From: sunkaixuan <610262374@qq.com> Date: Wed, 19 Jul 2023 17:49:50 +0800 Subject: [PATCH] Storageable BUG --- .../SqlSugar/Abstract/DeleteProvider/DeleteableProvider.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Src/Asp.NetCore2/SqlSugar/Abstract/DeleteProvider/DeleteableProvider.cs b/Src/Asp.NetCore2/SqlSugar/Abstract/DeleteProvider/DeleteableProvider.cs index 9183b19b6..f8c7bc995 100644 --- a/Src/Asp.NetCore2/SqlSugar/Abstract/DeleteProvider/DeleteableProvider.cs +++ b/Src/Asp.NetCore2/SqlSugar/Abstract/DeleteProvider/DeleteableProvider.cs @@ -162,8 +162,8 @@ namespace SqlSugar { if (i != 0) andString.Append(DeleteBuilder.WhereInAndTemplate + UtilConstants.Space); - var entityPropertyName = this.Context.EntityMaintenance.GetPropertyName(primaryField); - var columnInfo = EntityInfo.Columns.Single(it => it.PropertyName == entityPropertyName); + //var entityPropertyName = this.EntityInfo.Columns.Single(it=>it.PropertyName.EqualCase(primaryField)||it.DbColumnName.EqualCase(primaryField)).PropertyName; + var columnInfo = EntityInfo.Columns.Single(t => t.PropertyName.EqualCase(primaryField) || t.DbColumnName.EqualCase(primaryField)); var entityValue = columnInfo.PropertyInfo.GetValue(deleteObj, null); var tempequals = DeleteBuilder.WhereInEqualTemplate; if (this.Context.CurrentConnectionConfig.MoreSettings != null && this.Context.CurrentConnectionConfig.MoreSettings.DisableNvarchar == true)