diff --git a/Src/Asp.NetCore2/SqlSeverTest/SqlSeverTest/UnitTest/UInsert.cs b/Src/Asp.NetCore2/SqlSeverTest/SqlSeverTest/UnitTest/UInsert.cs index 6bd6c405d..0329c83fc 100644 --- a/Src/Asp.NetCore2/SqlSeverTest/SqlSeverTest/UnitTest/UInsert.cs +++ b/Src/Asp.NetCore2/SqlSeverTest/SqlSeverTest/UnitTest/UInsert.cs @@ -11,6 +11,7 @@ namespace OrmTest public static void Insert() { var db = Db; + db.CodeFirst.InitTables(); db.DbMaintenance.TruncateTable(); db.CodeFirst.InitTables(); db.Insertable(new List diff --git a/Src/Asp.NetCore2/SqlSeverTest/SqlSugar/Abstract/SqlBuilderProvider/QueryBuilder.cs b/Src/Asp.NetCore2/SqlSeverTest/SqlSugar/Abstract/SqlBuilderProvider/QueryBuilder.cs index 0b206e7c8..c2f89108f 100644 --- a/Src/Asp.NetCore2/SqlSeverTest/SqlSugar/Abstract/SqlBuilderProvider/QueryBuilder.cs +++ b/Src/Asp.NetCore2/SqlSeverTest/SqlSugar/Abstract/SqlBuilderProvider/QueryBuilder.cs @@ -256,7 +256,7 @@ namespace SqlSugar resolveExpress.SqlFuncServices = Context.CurrentConnectionConfig.ConfigureExternalServices == null ? null : Context.CurrentConnectionConfig.ConfigureExternalServices.SqlFuncServices; }; resolveExpress.Resolve(expression, resolveType); - this.Parameters.AddRange(resolveExpress.Parameters); + this.Parameters.AddRange(resolveExpress.Parameters.Select(it=>new SugarParameter(it.ParameterName, it.Value))); var result = resolveExpress.Result; var isSingleTableHasSubquery = IsSingle() && resolveExpress.SingleTableNameSubqueryShortName.HasValue(); if (isSingleTableHasSubquery)