You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sunkaixuan edited this page May 4, 2019
·
5 revisions
Convert Sql to Queryable
1.Page
inttotal=0;varlist=db.SqlQueryable<Student>("select * from student").ToPageList(1,2,reftotal);
2.Where
//by expressionvarlist=db.SqlQueryable<Student>("select * from student").Where(it=>it.Id==1).ToPageList(1,2);//by sqlvarlist=db.SqlQueryable<Student>("select * from student").Where("id=@id",new{id=1}).ToPageList(1,2);