Update demo

This commit is contained in:
sunkaixuan 2022-12-15 19:57:29 +08:00
parent 1965aa1a77
commit 3a314941b7

View File

@ -28,6 +28,11 @@ namespace OrmTest
{ {
IsAutoToUpper = false IsAutoToUpper = false
}; };
if (db.DbMaintenance.IsAnyTable("CodeFirstNoUpper4",false))
{
db.DbMaintenance.DropTable<CodeFirstNoUpper4>();
}
db.CodeFirst.InitTables<CodeFirstNoUpper4>();
db.CodeFirst.InitTables<CodeFirstNoUpper4>(); db.CodeFirst.InitTables<CodeFirstNoUpper4>();
db.Insertable(new CodeFirstNoUpper4() { Id = Guid.NewGuid() + "", Name = "a" }).ExecuteCommand(); db.Insertable(new CodeFirstNoUpper4() { Id = Guid.NewGuid() + "", Name = "a" }).ExecuteCommand();
var list2 = db.Queryable<CodeFirstNoUpper4>().Where(it => it.Id != null).ToList(); var list2 = db.Queryable<CodeFirstNoUpper4>().Where(it => it.Id != null).ToList();