Exemple #1
0
        private async void OnSaveClicked(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(NewJoke.Text))
            {
                return;
            }

            var joke = new Joke
            {
                Content = NewJoke.Text
            };
            await App.Database.SaveJokeAsync(joke);

            ListView.ItemsSource = await App.Database.GetJokesAsync();
        }
Exemple #2
0
 public Task <int> SaveJokeAsync(Joke joke)
 {
     return(Database.InsertAsync(joke));
 }