Skip to content

Instantly share code, notes, and snippets.

@susairajs
Created January 19, 2020 14:07
public async Task AddPerson(int personId,string name)
{
await firebase
.Child("Persons")
.PostAsync(new Person() { PersonId=personId, Name = name });
}
private async void BtnAdd_Clicked(object sender, EventArgs e)
{
await firebaseHelper.AddPerson(Convert.ToInt32(txtId.Text), txtName.Text);
txtId.Text = string.Empty;
txtName.Text = string.Empty;
await DisplayAlert("Success", "Person Added Successfully", "OK");
var allPersons = await firebaseHelper.GetAllPersons();
lstPersons.ItemsSource = allPersons;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment