mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-04-24 18:04:52 +08:00
27 lines
716 B
C#
27 lines
716 B
C#
![]() |
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.Linq;
|
|||
|
using System.Text;
|
|||
|
using System.Threading.Tasks;
|
|||
|
|
|||
|
namespace OrmTest
|
|||
|
{
|
|||
|
public partial class NewUnitTest
|
|||
|
{
|
|||
|
public static void Queryable() {
|
|||
|
|
|||
|
var pageindex = 1;
|
|||
|
var pagesize = 10;
|
|||
|
var total = 0;
|
|||
|
var totalPage = 0;
|
|||
|
var list=Db.Queryable<Order>().ToPageList(pageindex, pagesize, ref total, ref totalPage);
|
|||
|
|
|||
|
Db.CodeFirst.InitTables(typeof(CarType));
|
|||
|
Db.Updateable<CarType>()
|
|||
|
.SetColumns(it => new CarType { State =SqlSugar.SqlFunc.IIF(it.State==true,false,true) }).Where(it=>true)
|
|||
|
.ExecuteCommand();
|
|||
|
|
|||
|
}
|
|||
|
}
|
|||
|
}
|