Update .net framework project

This commit is contained in:
sunkaixuan 2022-06-25 16:19:45 +08:00
parent e1ad221ebe
commit 41cadf3117

View File

@ -228,6 +228,8 @@ namespace SqlSugar
} }
if (!this.Context.DbMaintenance.IsAnyIndex(item.IndexName)) if (!this.Context.DbMaintenance.IsAnyIndex(item.IndexName))
{ {
var querybulder = InstanceFactory.GetSqlbuilder(this.Context.CurrentConnectionConfig);
querybulder.Context = this.Context;
var fileds = item.IndexFields var fileds = item.IndexFields
.Select(it => .Select(it =>
{ {
@ -238,7 +240,7 @@ namespace SqlSugar
} }
return new KeyValuePair<string, OrderByType>(dbColumn.DbColumnName, it.Value); return new KeyValuePair<string, OrderByType>(dbColumn.DbColumnName, it.Value);
}) })
.Select(it => it.Key + " " + it.Value).ToArray(); .Select(it => querybulder.GetTranslationColumnName(it.Key) + " " + it.Value).ToArray();
this.Context.DbMaintenance.CreateIndex(entityInfo.DbTableName, fileds, item.IndexName, item.IsUnique); this.Context.DbMaintenance.CreateIndex(entityInfo.DbTableName, fileds, item.IndexName, item.IsUnique);
} }
} }