mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-23 22:11:36 +08:00
Add unit test
This commit is contained in:
parent
674f097d2a
commit
5f45b608bc
@ -1,6 +1,7 @@
|
|||||||
using SqlSugar;
|
using SqlSugar;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
namespace OrmTest
|
namespace OrmTest
|
||||||
@ -29,7 +30,20 @@ namespace OrmTest
|
|||||||
//Console.WriteLine(sql);//输出sql
|
//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();
|
db.DbMaintenance.CreateDatabase();
|
||||||
var type = db.DynamicBuilder().CreateClass("UnitEntityA",
|
var type = db.DynamicBuilder().CreateClass("UnitEntityA",
|
||||||
new SugarTable()
|
new SugarTable()
|
||||||
|
Loading…
Reference in New Issue
Block a user