diff --git a/Src/Asp.NetCore2/MySqlTest/UnitTest/UnitCreateType.cs b/Src/Asp.NetCore2/MySqlTest/UnitTest/UnitCreateType.cs index 7cfb9a3cb..1220232d1 100644 --- a/Src/Asp.NetCore2/MySqlTest/UnitTest/UnitCreateType.cs +++ b/Src/Asp.NetCore2/MySqlTest/UnitTest/UnitCreateType.cs @@ -1,6 +1,7 @@ using SqlSugar; using System; using System.Collections.Generic; +using System.Linq; using System.Text; namespace OrmTest @@ -29,7 +30,20 @@ namespace OrmTest //Console.WriteLine(sql);//输出sql }; }); - + + List ids = new List(); + for (int i = 0; i < 100; i++) + { + var guids = db.Queryable().Select(it => + SqlFunc.NewUid() + ).Take(10).ToList(); ; + ids.AddRange(guids); + } + var count= ids.Distinct().Count(); + if (count != ids.Count) + { + throw new Exception("unit error"); + } db.DbMaintenance.CreateDatabase(); var type = db.DynamicBuilder().CreateClass("UnitEntityA", new SugarTable()