You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
51 lines
1.6 KiB
51 lines
1.6 KiB
using SqlSugar;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
|
|
namespace Test
|
|
{
|
|
partial class Program
|
|
{
|
|
|
|
private static void Deleteable01(JsonClient jsonToSqlClient)
|
|
{
|
|
jsonToSqlClient.Context.Queryable<object>().AS("order").Max<int>("id");
|
|
Demo111(jsonToSqlClient);
|
|
Demo222(jsonToSqlClient);
|
|
Demo333(jsonToSqlClient);
|
|
}
|
|
|
|
private static void Demo111(JsonClient jsonToSqlClient)
|
|
{
|
|
var json = @"
|
|
{
|
|
""Table"":""order"",
|
|
Where:[ ""id"","" = "",""{int}:1"" ]
|
|
}
|
|
";
|
|
var x1 = jsonToSqlClient.Deleteable(json).ToSqlList();
|
|
var list1 = jsonToSqlClient.Context.Ado.SqlQuery<dynamic>(x1[0].Sql, x1[0].Parameters);
|
|
}
|
|
private static void Demo222(JsonClient jsonToSqlClient)
|
|
{
|
|
var json = @"
|
|
{
|
|
""Table"":""order"",
|
|
Where:[ ""id"","" = "",""{int}:1"" ]
|
|
}
|
|
";
|
|
var x1 = jsonToSqlClient.Deleteable(json).ToSqlList();
|
|
var list1 = jsonToSqlClient.Context.Ado.SqlQuery<dynamic>(x1[0].Sql, x1[0].Parameters);
|
|
}
|
|
private static void Demo333(JsonClient jsonToSqlClient)
|
|
{
|
|
var json = @"
|
|
{
|
|
""Table"":""order""
|
|
}
|
|
";
|
|
var x1 = jsonToSqlClient.Deleteable(json).ToSqlList();
|
|
var list1 = jsonToSqlClient.Context.Ado.SqlQuery<dynamic>(x1[0].Sql, x1[0].Parameters);
|
|
}
|
|
}
|
|
}
|
|
|