|
|
@ -41,6 +41,30 @@ namespace OrmTest |
|
|
|
if (Db.DbMaintenance.IsAnyTable("User", false)) |
|
|
|
Db.DbMaintenance.DropTable("User"); |
|
|
|
Db.CodeFirst.InitTables<User>(); |
|
|
|
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 = "0")] |
|
|
|
public int dt { get; set; } |
|
|
|
} |
|
|
|
public class User |
|
|
|
{ |
|
|
|