Reputation: 443
I am using FirebaseDatabase.net plugin in my xamarin mobile app.
I am able to insert and read data,but unable to use update.I am using PutAsync method:
Example:
FirebaseClient firebase = new FirebaseClient("https://******.firebaseio.com/");
await firebase.Child("Users").Child("nhUHmmu8HJimlo").PutAsync(JsonConvert.SerializeObject(user));
in the last line I am not able to use multiple 'Child' keyword for this PutAsync method,so how to solve this?Is there any other way to achieve this?
Upvotes: 0
Views: 215
Reputation: 599766
I'm not sure why the Xamarin client only allows a single call to Child()
as all official SDKs allow you to chain those.
Luckily you can put the entire path in a single call, by separating the segments with /
. So:
firebase.Child("Users/nhUHmmu8HJimlo").PutAsync(JsonConvert.SerializeObject(user));
Upvotes: 1