【发布时间】:2022-01-19 00:12:58
【问题描述】:
我正在尝试检索数据,他的类型是映射到 c# 中的组合框,但我失败了,我需要帮助 这是我的尝试
async void GetSection()
{
DocumentReference docRef = database.Collection("Class").Document(combClasses.SelectedItem.ToString());
DocumentSnapshot snapshot = await docRef.GetSnapshotAsync();
if (snapshot.Exists)
{
//MessageBox.Show("Document data for {0} document:", snapshot.Id);
Dictionary<string, object> city = snapshot.ToDictionary();
foreach (KeyValuePair<string, object> pair in city)
{
if (pair.Key.Equals("Section"))
{
}
}
}
else
{
Console.WriteLine("Document {0} does not exist!", snapshot.Id);
}
}
【问题讨论】:
-
你的问题是什么?你被困在哪里了?
-
我做到了,谢谢
-
你解决了吗?您可以自行回答以分享您的解决方法,以帮助其他人
-
好的,我现在就分享它
标签: c# firebase google-cloud-firestore