Created
January 19, 2020 14:07
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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