mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-04-05 17:37:58 +08:00
Add unit test
This commit is contained in:
parent
674f097d2a
commit
5f45b608bc
@ -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<Guid> ids = new List<Guid>();
|
||||
for (int i = 0; i < 100; i++)
|
||||
{
|
||||
var guids = db.Queryable<Order>().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()
|
||||
|
Loading…
Reference in New Issue
Block a user