【问题标题】:How to get all data from firebase with firesharp如何使用firesharp从firebase获取所有数据
【发布时间】:2019-10-18 06:07:50
【问题描述】:

我在 firebase 中有 user_table,我想从 user_table 中获取所有节点数据作为列表。

我可以用

获取所有数据
FirebaseResponse response = await client.GetTaskAsync("User_Table\");

,那么我无法将json数据序列化为对象

 FirebaseResponse response = await client.GetTaskAsync("User_Table\\");
 List<UserList> usr = (List<UserList>)JsonConvert.DeserializeObject(response.ToString(), (typeof(List<UserList>)));

【问题讨论】:

    标签: c# firebase fire-sharp


    【解决方案1】:

    您是否尝试过使用dictionaryforeach

    您也可以尝试学习 YouTube 上的本教程 https://m.youtube.com/watch?v=oeblTSuBjSo&t=1s

    例子:

    FirebaseResponse response = await client.GetAsync("users");
    Dictionary<string, Class> data = response.ResultAs<Dictionary<string, Data>>();
    return data;
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-09-15
      • 2020-09-13
      • 1970-01-01
      • 1970-01-01
      • 2021-07-31
      • 1970-01-01
      相关资源
      最近更新 更多