From d748257ea86c54f22627685bb33615acf1f3c3c0 Mon Sep 17 00:00:00 2001 From: sunkaixuan <610262374@qq.com> Date: Fri, 27 May 2022 11:17:55 +0800 Subject: [PATCH] Update Core --- .../SqlSugar/Abstract/CodeFirstProvider/CodeFirstProvider.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Src/Asp.NetCore2/SqlSugar/Abstract/CodeFirstProvider/CodeFirstProvider.cs b/Src/Asp.NetCore2/SqlSugar/Abstract/CodeFirstProvider/CodeFirstProvider.cs index 4d2df7c25..03c7e3d47 100644 --- a/Src/Asp.NetCore2/SqlSugar/Abstract/CodeFirstProvider/CodeFirstProvider.cs +++ b/Src/Asp.NetCore2/SqlSugar/Abstract/CodeFirstProvider/CodeFirstProvider.cs @@ -222,6 +222,10 @@ namespace SqlSugar { foreach (var item in entityInfo.Indexs) { + if (entityInfo.Type.GetCustomAttribute() != null) + { + item.IndexName = item.IndexName + entityInfo.DbTableName; + } if (!this.Context.DbMaintenance.IsAnyIndex(item.IndexName)) { var fileds = item.IndexFields