Update sqlite

This commit is contained in:
sunkaixuan 2023-05-07 18:42:23 +08:00
parent f58eeef924
commit 2862cb83b2
2 changed files with 10 additions and 0 deletions

View File

@ -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();

View File

@ -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 ***/