diff --git a/Src/Asp.NetCore2/MySqlTest/Demo/Demo2_Updateable.cs b/Src/Asp.NetCore2/MySqlTest/Demo/Demo2_Updateable.cs index c81a12a40..6c172b050 100644 --- a/Src/Asp.NetCore2/MySqlTest/Demo/Demo2_Updateable.cs +++ b/Src/Asp.NetCore2/MySqlTest/Demo/Demo2_Updateable.cs @@ -66,8 +66,11 @@ namespace OrmTest var result8 = db.Updateable(it => it.Name == "Name" + "1").Where(it => it.Id == 1).ExecuteCommand(); var result81 = db.Updateable().SetColumns(it => it.Name == "Name" + "1").Where(it => it.Id == 1).ExecuteCommand(); // - - + var result61 = db.Updateable() + .InnerJoin((x, y) => x.CustomId == y.Id) + .SetColumns((x, y) => new Order() { Name = y.Name, Price = y.Id }) + .Where((x, y) => x.Id == 1) + .ExecuteCommand(); /*** 3.by Dictionary ***/ diff --git a/Src/Asp.NetCore2/SqlSeverTest/Demo/Demo2_Updateable.cs b/Src/Asp.NetCore2/SqlSeverTest/Demo/Demo2_Updateable.cs index fe911ddb0..746e9942b 100644 --- a/Src/Asp.NetCore2/SqlSeverTest/Demo/Demo2_Updateable.cs +++ b/Src/Asp.NetCore2/SqlSeverTest/Demo/Demo2_Updateable.cs @@ -66,9 +66,11 @@ namespace OrmTest var result8 = db.Updateable(it => it.Name == "Name" + "1").Where(it => it.Id == 1).ExecuteCommand(); var result81 = db.Updateable().SetColumns(it => it.Name == "Name" + "1").Where(it => it.Id == 1).ExecuteCommand(); // - - - + var result61 = db.Updateable() + .InnerJoin((x, y) => x.CustomId == y.Id) + .SetColumns((x, y) => new Order() { Name = y.Name, Price=y.Id }) + .Where((x, y) => x.Id == 1) + .ExecuteCommand(); /*** 3.by Dictionary ***/ var dt = new Dictionary(); diff --git a/Src/Asp.NetCore2/SqlSugar/Abstract/UpdateProvider/UpdateableProviderT2.cs b/Src/Asp.NetCore2/SqlSugar/Abstract/UpdateProvider/UpdateableProviderT2.cs index d1e195e64..91a1d5b9a 100644 --- a/Src/Asp.NetCore2/SqlSugar/Abstract/UpdateProvider/UpdateableProviderT2.cs +++ b/Src/Asp.NetCore2/SqlSugar/Abstract/UpdateProvider/UpdateableProviderT2.cs @@ -36,7 +36,7 @@ namespace SqlSugar foreach (var item in items) { var dbColumnName=updateableObj.UpdateBuilder.Context.EntityMaintenance.GetDbColumnName(item.Key); - var value = updateableObj.UpdateBuilder.GetExpressionValue(item.Value, ResolveExpressType.WhereMultiple).GetString(); + var value = updateableObj.UpdateBuilder.GetExpressionValue(ExpressionTool.RemoveConvert(item.Value), ResolveExpressType.WhereMultiple).GetString(); this.updateableObj.UpdateBuilder.SetValues.Add(new KeyValuePair(dbColumnName, value)); } UpdateBuilder.DbColumnInfoList = UpdateBuilder.DbColumnInfoList