Modify Demo

This commit is contained in:
sunkaixuan 2019-05-23 08:59:22 +08:00
parent 802cb6f33b
commit e85d5e07fd

View File

@ -19,7 +19,7 @@ namespace OrmTest
InitKeyType = InitKeyType.Attribute, InitKeyType = InitKeyType.Attribute,
IsAutoCloseConnection = true IsAutoCloseConnection = true
}); });
db.DbMaintenance.CreateDatabase();//default bin/database db.DbMaintenance.CreateDatabase();
db.CodeFirst.InitTables(typeof(CodeFirstTable1));//Create CodeFirstTable1 db.CodeFirst.InitTables(typeof(CodeFirstTable1));//Create CodeFirstTable1
db.Insertable(new CodeFirstTable1() { Name = "a", Text="a" }).ExecuteCommand(); db.Insertable(new CodeFirstTable1() { Name = "a", Text="a" }).ExecuteCommand();
var list = db.Queryable<CodeFirstTable1>().ToList(); var list = db.Queryable<CodeFirstTable1>().ToList();