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;
}`
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)
{