Browse Source

Update demo

pull/4/MERGE
sunkaixuna 3 years ago
parent
commit
9c4341d21c
  1. 4
      Src/Asp.NetCore2/SqlSeverTest/DmOrmTest/Demo/Demo0_SqlSugarClient.cs
  2. 4
      Src/Asp.NetCore2/SqlSeverTest/KdbndpTest/Demo/Demo0_SqlSugarClient.cs
  3. 4
      Src/Asp.NetCore2/SqlSeverTest/MySqlTest/Demo/Demo0_SqlSugarClient.cs
  4. 4
      Src/Asp.NetCore2/SqlSeverTest/OracleTest/Demo/Demo0_SqlSugarClient.cs
  5. 4
      Src/Asp.NetCore2/SqlSeverTest/PgSqlTest/Demo/Demo0_SqlSugarClient.cs
  6. 4
      Src/Asp.NetCore2/SqlSeverTest/SqlSeverTest/Demo/Demo0_SqlSugarClient.cs
  7. 4
      Src/Asp.NetCore2/SqlSeverTest/SqliteTest/Demo/Demo0_SqlSugarClient.cs

4
Src/Asp.NetCore2/SqlSeverTest/DmOrmTest/Demo/Demo0_SqlSugarClient.cs

@ -103,9 +103,9 @@ namespace OrmTest
var data4 = orderDb.GetSingle(it => it.Id == 1); var data4 = orderDb.GetSingle(it => it.Id == 1);
var p = new PageModel() { PageIndex = 1, PageSize = 2 }; var p = new PageModel() { PageIndex = 1, PageSize = 2 };
var data5 = orderDb.GetPageList(it => it.Name == "xx", p); var data5 = orderDb.GetPageList(it => it.Name == "xx", p);
Console.Write(p.PageCount); Console.Write(p.TotalCount);
var data6 = orderDb.GetPageList(it => it.Name == "xx", p, it => it.Name, OrderByType.Asc); var data6 = orderDb.GetPageList(it => it.Name == "xx", p, it => it.Name, OrderByType.Asc);
Console.Write(p.PageCount); Console.Write(p.TotalCount);
List<IConditionalModel> conModels = new List<IConditionalModel>(); List<IConditionalModel> conModels = new List<IConditionalModel>();
conModels.Add(new ConditionalModel() { FieldName = "id", ConditionalType = ConditionalType.Equal, FieldValue = "1", FieldValueConvertFunc=it=>Convert.ToInt32(it) });//id=1 conModels.Add(new ConditionalModel() { FieldName = "id", ConditionalType = ConditionalType.Equal, FieldValue = "1", FieldValueConvertFunc=it=>Convert.ToInt32(it) });//id=1
var data7 = orderDb.GetPageList(conModels, p, it => it.Name, OrderByType.Asc); var data7 = orderDb.GetPageList(conModels, p, it => it.Name, OrderByType.Asc);

4
Src/Asp.NetCore2/SqlSeverTest/KdbndpTest/Demo/Demo0_SqlSugarClient.cs

@ -103,9 +103,9 @@ namespace OrmTest
var data4 = orderDb.GetSingle(it => it.Id == 1); var data4 = orderDb.GetSingle(it => it.Id == 1);
var p = new PageModel() { PageIndex = 1, PageSize = 2 }; var p = new PageModel() { PageIndex = 1, PageSize = 2 };
var data5 = orderDb.GetPageList(it => it.Name == "xx", p); var data5 = orderDb.GetPageList(it => it.Name == "xx", p);
Console.Write(p.PageCount); Console.Write(p.TotalCount);
var data6 = orderDb.GetPageList(it => it.Name == "xx", p, it => it.Name, OrderByType.Asc); var data6 = orderDb.GetPageList(it => it.Name == "xx", p, it => it.Name, OrderByType.Asc);
Console.Write(p.PageCount); Console.Write(p.TotalCount);
List<IConditionalModel> conModels = new List<IConditionalModel>(); List<IConditionalModel> conModels = new List<IConditionalModel>();
conModels.Add(new ConditionalModel() { FieldName = "id", ConditionalType = ConditionalType.Equal, FieldValue = "1", FieldValueConvertFunc=it=>Convert.ToInt32(it) });//id=1 conModels.Add(new ConditionalModel() { FieldName = "id", ConditionalType = ConditionalType.Equal, FieldValue = "1", FieldValueConvertFunc=it=>Convert.ToInt32(it) });//id=1
var data7 = orderDb.GetPageList(conModels, p, it => it.Name, OrderByType.Asc); var data7 = orderDb.GetPageList(conModels, p, it => it.Name, OrderByType.Asc);

4
Src/Asp.NetCore2/SqlSeverTest/MySqlTest/Demo/Demo0_SqlSugarClient.cs

@ -103,9 +103,9 @@ namespace OrmTest
var data4 = orderDb.GetSingle(it => it.Id == 1); var data4 = orderDb.GetSingle(it => it.Id == 1);
var p = new PageModel() { PageIndex = 1, PageSize = 2 }; var p = new PageModel() { PageIndex = 1, PageSize = 2 };
var data5 = orderDb.GetPageList(it => it.Name == "xx", p); var data5 = orderDb.GetPageList(it => it.Name == "xx", p);
Console.Write(p.PageCount); Console.Write(p.TotalCount);
var data6 = orderDb.GetPageList(it => it.Name == "xx", p, it => it.Name, OrderByType.Asc); var data6 = orderDb.GetPageList(it => it.Name == "xx", p, it => it.Name, OrderByType.Asc);
Console.Write(p.PageCount); Console.Write(p.TotalCount);
List<IConditionalModel> conModels = new List<IConditionalModel>(); List<IConditionalModel> conModels = new List<IConditionalModel>();
conModels.Add(new ConditionalModel() { FieldName = "id", ConditionalType = ConditionalType.Equal, FieldValue = "1" });//id=1 conModels.Add(new ConditionalModel() { FieldName = "id", ConditionalType = ConditionalType.Equal, FieldValue = "1" });//id=1
var data7 = orderDb.GetPageList(conModels, p, it => it.Name, OrderByType.Asc); var data7 = orderDb.GetPageList(conModels, p, it => it.Name, OrderByType.Asc);

4
Src/Asp.NetCore2/SqlSeverTest/OracleTest/Demo/Demo0_SqlSugarClient.cs

@ -110,9 +110,9 @@ namespace OrmTest
var data4 = orderDb.GetSingle(it => it.Id == 1); var data4 = orderDb.GetSingle(it => it.Id == 1);
var p = new PageModel() { PageIndex = 1, PageSize = 2 }; var p = new PageModel() { PageIndex = 1, PageSize = 2 };
var data5 = orderDb.GetPageList(it => it.Name == "xx", p); var data5 = orderDb.GetPageList(it => it.Name == "xx", p);
Console.Write(p.PageCount); Console.Write(p.TotalCount);
var data6 = orderDb.GetPageList(it => it.Name == "xx", p, it => it.Name, OrderByType.Asc); var data6 = orderDb.GetPageList(it => it.Name == "xx", p, it => it.Name, OrderByType.Asc);
Console.Write(p.PageCount); Console.Write(p.TotalCount);
List<IConditionalModel> conModels = new List<IConditionalModel>(); List<IConditionalModel> conModels = new List<IConditionalModel>();
conModels.Add(new ConditionalModel() { FieldName = "id", ConditionalType = ConditionalType.Equal, FieldValue = "1" });//id=1 conModels.Add(new ConditionalModel() { FieldName = "id", ConditionalType = ConditionalType.Equal, FieldValue = "1" });//id=1
var data7 = orderDb.GetPageList(conModels, p, it => it.Name, OrderByType.Asc); var data7 = orderDb.GetPageList(conModels, p, it => it.Name, OrderByType.Asc);

4
Src/Asp.NetCore2/SqlSeverTest/PgSqlTest/Demo/Demo0_SqlSugarClient.cs

@ -103,9 +103,9 @@ namespace OrmTest
var data4 = orderDb.GetSingle(it => it.Id == 1); var data4 = orderDb.GetSingle(it => it.Id == 1);
var p = new PageModel() { PageIndex = 1, PageSize = 2 }; var p = new PageModel() { PageIndex = 1, PageSize = 2 };
var data5 = orderDb.GetPageList(it => it.Name == "xx", p); var data5 = orderDb.GetPageList(it => it.Name == "xx", p);
Console.Write(p.PageCount); Console.Write(p.TotalCount);
var data6 = orderDb.GetPageList(it => it.Name == "xx", p, it => it.Name, OrderByType.Asc); var data6 = orderDb.GetPageList(it => it.Name == "xx", p, it => it.Name, OrderByType.Asc);
Console.Write(p.PageCount); Console.Write(p.TotalCount);
List<IConditionalModel> conModels = new List<IConditionalModel>(); List<IConditionalModel> conModels = new List<IConditionalModel>();
conModels.Add(new ConditionalModel() { FieldName = "id", ConditionalType = ConditionalType.Equal, FieldValue = "1", FieldValueConvertFunc=it=>Convert.ToInt32(it) });//id=1 conModels.Add(new ConditionalModel() { FieldName = "id", ConditionalType = ConditionalType.Equal, FieldValue = "1", FieldValueConvertFunc=it=>Convert.ToInt32(it) });//id=1
var data7 = orderDb.GetPageList(conModels, p, it => it.Name, OrderByType.Asc); var data7 = orderDb.GetPageList(conModels, p, it => it.Name, OrderByType.Asc);

4
Src/Asp.NetCore2/SqlSeverTest/SqlSeverTest/Demo/Demo0_SqlSugarClient.cs

@ -104,9 +104,9 @@ namespace OrmTest
var data4 = orderDb.GetSingle(it => it.Id == 1); var data4 = orderDb.GetSingle(it => it.Id == 1);
var p = new PageModel() { PageIndex = 1, PageSize = 2 }; var p = new PageModel() { PageIndex = 1, PageSize = 2 };
var data5 = orderDb.GetPageList(it => it.Name == "xx", p); var data5 = orderDb.GetPageList(it => it.Name == "xx", p);
Console.Write(p.PageCount); Console.Write(p.TotalCount);
var data6 = orderDb.GetPageList(it => it.Name == "xx", p, it => it.Name, OrderByType.Asc); var data6 = orderDb.GetPageList(it => it.Name == "xx", p, it => it.Name, OrderByType.Asc);
Console.Write(p.PageCount); Console.Write(p.TotalCount);
List<IConditionalModel> conModels = new List<IConditionalModel>(); List<IConditionalModel> conModels = new List<IConditionalModel>();
conModels.Add(new ConditionalModel() { FieldName = "id", ConditionalType = ConditionalType.Equal, FieldValue = "1" });//id=1 conModels.Add(new ConditionalModel() { FieldName = "id", ConditionalType = ConditionalType.Equal, FieldValue = "1" });//id=1
var data7 = orderDb.GetPageList(conModels, p, it => it.Name, OrderByType.Asc); var data7 = orderDb.GetPageList(conModels, p, it => it.Name, OrderByType.Asc);

4
Src/Asp.NetCore2/SqlSeverTest/SqliteTest/Demo/Demo0_SqlSugarClient.cs

@ -103,9 +103,9 @@ namespace OrmTest
var data4 = orderDb.GetSingle(it => it.Id == 1); var data4 = orderDb.GetSingle(it => it.Id == 1);
var p = new PageModel() { PageIndex = 1, PageSize = 2 }; var p = new PageModel() { PageIndex = 1, PageSize = 2 };
var data5 = orderDb.GetPageList(it => it.Name == "xx", p); var data5 = orderDb.GetPageList(it => it.Name == "xx", p);
Console.Write(p.PageCount); Console.Write(p.TotalCount);
var data6 = orderDb.GetPageList(it => it.Name == "xx", p, it => it.Name, OrderByType.Asc); var data6 = orderDb.GetPageList(it => it.Name == "xx", p, it => it.Name, OrderByType.Asc);
Console.Write(p.PageCount); Console.Write(p.TotalCount);
List<IConditionalModel> conModels = new List<IConditionalModel>(); List<IConditionalModel> conModels = new List<IConditionalModel>();
conModels.Add(new ConditionalModel() { FieldName = "id", ConditionalType = ConditionalType.Equal, FieldValue = "1" });//id=1 conModels.Add(new ConditionalModel() { FieldName = "id", ConditionalType = ConditionalType.Equal, FieldValue = "1" });//id=1
var data7 = orderDb.GetPageList(conModels, p, it => it.Name, OrderByType.Asc); var data7 = orderDb.GetPageList(conModels, p, it => it.Name, OrderByType.Asc);

Loading…
Cancel
Save