update

2881099
2022-08-13 18:04:10 +08:00
parent cb48d7ad1b
commit c6e29022b0

@@ -64,11 +64,11 @@ var orderByMapping = new Dictionary<string, string>
["order2"] = "len(a.name) desc"
};
//假设前端 POST 内容是 where1、where2
//假设前端 POST 内容是 postWhere=where1&postWhereValue=100&postOrder=order1
fsql.Select<Region>()
.WhereIf(
whereMapping.TryGetValue(postWhere, out var whereSql),
string.Format(whereSql, postValue)
string.Format(whereSql, postWhereValue)
)
.OrderBy(
orderByMapping.TryGetValue(postOrder, out var orderSql),