【问题标题】:System.Net.Http.HttpRequestException: 400 (Bad Request) OnceSingleAsync FIREBASESystem.Net.Http.HttpRequestException:400(错误请求)OnceSingleAsync FIREBASE
【发布时间】:2018-11-03 23:45:21
【问题描述】:

我正在尝试从 firebase 检索数据,但如果我添加 orderBy()EquatTo() 会出现此错误

这是我的代码:

var firebase = new FirebaseClient("https://xxx-xxx.xxxx.com/");
var _item = await firebase.Child("Pc and Laptops")
              .OrderBy("ProductID")
              .EqualTo("ID")
              .WithAuth("someauth")
              .OnceSingleAsync<object>();

这是我的数据库方案:

【问题讨论】:

    标签: c# firebase xamarin


    【解决方案1】:

    您想对从firebase检索的数据进行排序,从FireBase文档中,您可以看到排序数据的三种方式,OrderByChild()、OrderByKey()、OrderByValue()。

    https://firebase.google.com/docs/database/unity/retrieve-data

    因此您可以在查询语句中使用 OrderByChild()。

    【讨论】:

      猜你喜欢
      • 2020-04-20
      • 2022-11-12
      • 2016-09-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-08-04
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多