how do i get the id node key from the firebase realtime database using xamarinforms?

First, We will create Firebase Client using package.

FirebaseClient firebase = new FirebaseClient("Firebase Database URL");

User Model

public class User
        public string Name { get; set; }
        public string e-Mail { get; set; }

        public string Key { get; set; } //To Store ID

Firebase Query to get users

await firebase
              .OnceAsync<User>()).Select(item => new User
                  Key = item.Key, // This is the ID
                  Name = item.Object.Name,
                  e-Mail = item.Object.e-Mail

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top