mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-23 13:06:50 +08:00
Update Demo
This commit is contained in:
parent
438cf9504a
commit
f802407db4
7
Src/Asp.Net/SqlServerTest/Models/CarType.cs
Normal file
7
Src/Asp.Net/SqlServerTest/Models/CarType.cs
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
namespace OrmTest
|
||||||
|
{
|
||||||
|
public class CarType
|
||||||
|
{
|
||||||
|
public bool State { get; set; }
|
||||||
|
}
|
||||||
|
}
|
@ -145,6 +145,7 @@
|
|||||||
<Compile Include="OldTest\UnitTest\Setting\MapColumn.cs" />
|
<Compile Include="OldTest\UnitTest\Setting\MapColumn.cs" />
|
||||||
<Compile Include="OldTest\UnitTest\Setting\MapTable.cs" />
|
<Compile Include="OldTest\UnitTest\Setting\MapTable.cs" />
|
||||||
<Compile Include="OldTest\UnitTest\Update.cs" />
|
<Compile Include="OldTest\UnitTest\Update.cs" />
|
||||||
|
<Compile Include="Models\CarType.cs" />
|
||||||
<Compile Include="UnitTest\UAdo.cs" />
|
<Compile Include="UnitTest\UAdo.cs" />
|
||||||
<Compile Include="UnitTest\UQueryable.cs" />
|
<Compile Include="UnitTest\UQueryable.cs" />
|
||||||
<Compile Include="UnitTest\UQueryableAsync.cs" />
|
<Compile Include="UnitTest\UQueryableAsync.cs" />
|
||||||
|
@ -16,6 +16,11 @@ namespace OrmTest
|
|||||||
var totalPage = 0;
|
var totalPage = 0;
|
||||||
var list=Db.Queryable<Order>().ToPageList(pageindex, pagesize, ref total, ref totalPage);
|
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();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user