mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-23 22:11:36 +08:00
Update unit test
This commit is contained in:
parent
8c8d5b5259
commit
1803c609e0
@ -51,6 +51,31 @@ 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<UnitCodeFirstpks2>();
|
||||||
|
if (Db.DbMaintenance.IsAnyTable("UnitCodeFirst131", false))
|
||||||
|
Db.DbMaintenance.DropTable("UnitCodeFirst131");
|
||||||
|
Db.CodeFirst.InitTables<UnitCodeFirst131>();
|
||||||
|
Db.Insertable(new UnitCodeFirst131() { Id = 1 }).ExecuteCommand();
|
||||||
|
Db.CodeFirst.InitTables<UNITCODEFIRST131>();
|
||||||
|
Db.CodeFirst.InitTables<UNITCOdEFIRST131>();
|
||||||
|
}
|
||||||
|
public class UnitCodeFirst131
|
||||||
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
}
|
||||||
|
public class UNITCODEFIRST131
|
||||||
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
[SqlSugar.SugarColumn(DefaultValue = "a")]
|
||||||
|
public string Name { get; set; }
|
||||||
|
}
|
||||||
|
public class UNITCOdEFIRST131
|
||||||
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
[SqlSugar.SugarColumn(DefaultValue = "a")]
|
||||||
|
public string Name { get; set; }
|
||||||
|
[SqlSugar.SugarColumn(DefaultValue = "getdate()")]
|
||||||
|
public DateTime dt { get; set; }
|
||||||
}
|
}
|
||||||
public class User
|
public class User
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user