mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-19 10:08:19 +08:00
Update Sqlite
This commit is contained in:
Binary file not shown.
@@ -12,28 +12,28 @@ namespace OrmTest.Demo
|
||||
{
|
||||
var db = GetInstance();
|
||||
//Create all class
|
||||
db.DbFirst.CreateClassFile("c:\\DemoMySql\\1");
|
||||
db.DbFirst.CreateClassFile("c:\\DemoSqlite\\1");
|
||||
|
||||
//Create student calsss
|
||||
db.DbFirst.Where("Student").CreateClassFile("c:\\DemoMySql\\2");
|
||||
db.DbFirst.Where("Student").CreateClassFile("c:\\DemoSqlite\\2");
|
||||
//Where(array)
|
||||
|
||||
//Mapping name
|
||||
db.MappingTables.Add("ClassStudent", "Student");
|
||||
db.MappingColumns.Add("NewId", "Id", "ClassStudent");
|
||||
db.DbFirst.Where("Student").CreateClassFile("c:\\DemoMySql\\3");
|
||||
db.DbFirst.Where("Student").CreateClassFile("c:\\DemoSqlite\\3");
|
||||
|
||||
//Remove mapping
|
||||
db.MappingTables.Clear();
|
||||
|
||||
//Create class with default value
|
||||
db.DbFirst.IsCreateDefaultValue().CreateClassFile("c:\\DemoMySql\\4", "Demo.Models");
|
||||
db.DbFirst.IsCreateDefaultValue().CreateClassFile("c:\\DemoSqlite\\4", "Demo.Models");
|
||||
|
||||
|
||||
//Mapping and Attribute
|
||||
db.MappingTables.Add("ClassStudent", "Student");
|
||||
db.MappingColumns.Add("NewId", "Id", "ClassStudent");
|
||||
db.DbFirst.IsCreateAttribute().Where("Student").CreateClassFile("c:\\DemoMySql\\5");
|
||||
db.DbFirst.IsCreateAttribute().Where("Student").CreateClassFile("c:\\DemoSqlite\\5");
|
||||
|
||||
|
||||
//Remove mapping
|
||||
@@ -66,7 +66,7 @@ namespace OrmTest.Demo
|
||||
{
|
||||
return old;
|
||||
})
|
||||
.CreateClassFile("c:\\DemoMySql\\6");
|
||||
.CreateClassFile("c:\\DemoSqlite\\6");
|
||||
}
|
||||
}
|
||||
}
|
@@ -17,33 +17,33 @@ namespace OrmTest
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
//// /***Unit Test***/
|
||||
new Field(1).Init();
|
||||
new Where(1).Init();
|
||||
new Method(1).Init();
|
||||
new JoinQuery(1).Init();
|
||||
new SingleQuery(1).Init();
|
||||
new SelectQuery(1).Init();
|
||||
new AutoClose(1).Init();
|
||||
new Insert(1).Init();
|
||||
new Delete(1).Init();
|
||||
new Update(1).Init();
|
||||
new Mapping(1).Init();
|
||||
new DataTest(1).Init();
|
||||
////// /***Unit Test***/
|
||||
//new Field(1).Init();
|
||||
//new Where(1).Init();
|
||||
//new Method(1).Init();
|
||||
//new JoinQuery(1).Init();
|
||||
//new SingleQuery(1).Init();
|
||||
//new SelectQuery(1).Init();
|
||||
//new AutoClose(1).Init();
|
||||
//new Insert(1).Init();
|
||||
//new Delete(1).Init();
|
||||
//new Update(1).Init();
|
||||
//new Mapping(1).Init();
|
||||
//new DataTest(1).Init();
|
||||
|
||||
// /***Performance Test***/
|
||||
// new SqlSugarPerformance(100).Select();
|
||||
//// /***Performance Test***/
|
||||
//// new SqlSugarPerformance(100).Select();
|
||||
|
||||
/***Demo***/
|
||||
OrmTest.Demo.Query.Init();
|
||||
OrmTest.Demo.Insert.Init();
|
||||
OrmTest.Demo.Delete.Init();
|
||||
OrmTest.Demo.Update.Init();
|
||||
///***Demo***/
|
||||
//OrmTest.Demo.Query.Init();
|
||||
//OrmTest.Demo.Insert.Init();
|
||||
//OrmTest.Demo.Delete.Init();
|
||||
//OrmTest.Demo.Update.Init();
|
||||
OrmTest.Demo.DbFirst.Init();
|
||||
OrmTest.Demo.JoinSql.Init();
|
||||
OrmTest.Demo.Filter.Init();
|
||||
OrmTest.Demo.ComplexModel.Init();
|
||||
OrmTest.Demo.CodeFirst.Init();
|
||||
//OrmTest.Demo.JoinSql.Init();
|
||||
//OrmTest.Demo.Filter.Init();
|
||||
//OrmTest.Demo.ComplexModel.Init();
|
||||
//OrmTest.Demo.CodeFirst.Init();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user