mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-20 18:48:09 +08:00
Update demo
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
using OrmTest.Models;
|
||||
using SqlSugar;
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
@@ -23,13 +22,13 @@ namespace OrmTest
|
||||
});
|
||||
|
||||
int total = 0;
|
||||
var list = db.SqlQueryable<Student>("select * from \"ORDER\" ").ToPageList(1, 2, ref total);
|
||||
var list = db.SqlQueryable<Order>("select * from \"ORDER\" ").ToPageList(1, 2, ref total);
|
||||
|
||||
|
||||
//by expression
|
||||
var list2 = db.SqlQueryable<Student>("select * from \"ORDER\"").Where(it => it.Id == 1).ToPageList(1, 2);
|
||||
var list2 = db.SqlQueryable<Order>("select * from \"ORDER\"").Where(it => it.Id == 1).ToPageList(1, 2);
|
||||
//by sql
|
||||
var list3 = db.SqlQueryable<Student>("select * from \"ORDER\"").Where("id=@id", new { id = 1 }).ToPageList(1, 2);
|
||||
var list3 = db.SqlQueryable<Order>("select * from \"ORDER\"").Where("id=@id", new { id = 1 }).ToPageList(1, 2);
|
||||
|
||||
Console.WriteLine("#### SqlQueryable End ####");
|
||||
}
|
||||
|
Reference in New Issue
Block a user