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
7c1221d786
commit
454528d9ae
@ -30,6 +30,18 @@ namespace OrmTest
|
|||||||
if (Db.DbMaintenance.IsAnyTable("User", false))
|
if (Db.DbMaintenance.IsAnyTable("User", false))
|
||||||
Db.DbMaintenance.DropTable("User");
|
Db.DbMaintenance.DropTable("User");
|
||||||
Db.CodeFirst.InitTables<User>();
|
Db.CodeFirst.InitTables<User>();
|
||||||
|
Db.CodeFirst.InitTables<UnitDateOffsetTimex>();
|
||||||
|
Db.DbMaintenance.TruncateTable<UnitDateOffsetTimex>();
|
||||||
|
Db.Insertable(new UnitDateOffsetTimex() { offsetTime = DateTimeOffset.Now }).ExecuteCommand();
|
||||||
|
Db.Insertable(new List<UnitDateOffsetTimex>() {
|
||||||
|
new UnitDateOffsetTimex() { offsetTime = DateTimeOffset.Now },
|
||||||
|
new UnitDateOffsetTimex() { offsetTime = DateTimeOffset.Now }}).ExecuteCommand();
|
||||||
|
var dt=Db.Ado.GetDataTable("select * from UnitDateOffsetTimex");
|
||||||
|
}
|
||||||
|
|
||||||
|
public class UnitDateOffsetTimex
|
||||||
|
{
|
||||||
|
public DateTimeOffset offsetTime { get; set; }
|
||||||
}
|
}
|
||||||
public class User
|
public class User
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user