Browse Source

Update json 2 sql

SqlSugar5
sunkaixuan 2 years ago
parent
commit
20153626ea
  1. 6
      Src/Asp.Net/SqlSugar/Json2Sql/Provider/Deleteable/JsonDeleteableProvider.cs
  2. 6
      Src/Asp.Net/SqlSugar/Json2Sql/Provider/Updateable/JsonUpdateableProvider.cs

6
Src/Asp.Net/SqlSugar/Json2Sql/Provider/Deleteable/JsonDeleteableProvider.cs

@ -77,7 +77,11 @@ namespace SqlSugar
public JsonDeleteResult ToResult()
{
throw new NotImplementedException();
var result = new JsonDeleteResult();
var sqlInfo = this.ToSqlList();
var sqlInfoResult = sqlInfo.First();
result.UpdateRows = this.context.Ado.ExecuteCommand(sqlInfoResult.Sql, sqlInfoResult.Parameters);
return result;
}
List<string> IJsonProvider<JsonDeleteResult>.ToSqlString()

6
Src/Asp.Net/SqlSugar/Json2Sql/Provider/Updateable/JsonUpdateableProvider.cs

@ -21,7 +21,11 @@ namespace SqlSugar
}
public JsonUpdateResult ToResult()
{
return null;
var result = new JsonUpdateResult();
var sqlInfo = this.ToSqlList();
var sqlInfoResult = sqlInfo.First();
result.UpdateRows = this.context.Ado.ExecuteCommand(sqlInfoResult.Sql, sqlInfoResult.Parameters);
return result;
}
public SqlObjectResult ToSql()
{

Loading…
Cancel
Save