Browse Source

Update sqlite

pull/32/head
sunkaixuan 2 years ago
parent
commit
2862cb83b2
  1. 1
      Src/Asp.Net/SqlSugar/Realization/Sqlite/SqlBuilder/SqliteUpdateBuilder.cs
  2. 9
      Src/Asp.Net/SqliteTest/Demo/Demo2_Updateable.cs

1
Src/Asp.Net/SqlSugar/Realization/Sqlite/SqlBuilder/SqliteUpdateBuilder.cs

@ -7,6 +7,7 @@ namespace SqlSugar
{
public class SqliteUpdateBuilder : UpdateBuilder
{
public override string ReSetValueBySqlExpListType { get; set; }="sqlite";
protected override string TomultipleSqlString(List<IGrouping<int, DbColumnInfo>> groupList)
{
StringBuilder sb = new StringBuilder();

9
Src/Asp.Net/SqliteTest/Demo/Demo2_Updateable.cs

@ -55,6 +55,15 @@ namespace OrmTest
var result6 = db.Updateable(updateObjs).WhereColumns(it => new { it.Id }).ExecuteCommand();//update List<Class> by id
var result67 =
db.Updateable(updateObjs)
.PublicSetColumns(it => it.Price, it => it.Price + 1)
.ExecuteCommand();
var result68 =
db.Updateable(updateObjs.First())
.PublicSetColumns(it => it.Price, it => it.Price + 1)
.ExecuteCommand();
/*** 2.by expression ***/

Loading…
Cancel
Save