You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I'm working on a real-time database. And I want to know if is there a way to detect if the node has existed?
The code below displays the subject of a teacher within the school on the student app, but I have another app that would remove the "classkey" (on the teacher's app). The problem here is; When calling this function, it doesn't give an error or so for me to catch that error and notify the student that the class for these subjects has been removed. So I'm wondering, is there a way to check if the key for that node has existed or not?
//This code must detect if the node is available or not
var subjects = client
.Child($"Schools/{schoolKey}/Teachers/{T_Key}/MyClass/{classkey}/Subjects")
.AsObservable<Subjects>()
.AsObservableCollection();
return subjects;
}`
The text was updated successfully, but these errors were encountered:
L10Messi10
changed the title
How to detect if node exists
How to detect if node does not exists
Jul 16, 2022
Hello, I'm working on a real-time database. And I want to know if is there a way to detect if the node has existed?
The code below displays the subject of a teacher within the school on the student app, but I have another app that would remove the "classkey" (on the teacher's app). The problem here is; When calling this function, it doesn't give an error or so for me to catch that error and notify the student that the class for these subjects has been removed. So I'm wondering, is there a way to check if the key for that node has existed or not?
`public ObservableCollection GetClassSubjects(string classkey)
{
The text was updated successfully, but these errors were encountered: