예제 #1
0
        // Update joke in list
        private void OnJokeUpdated(JokeDetailViewModel viewModel, Joke joke)
        {
            var updatedJoke = Jokes.Single(j => j.Id == joke.Id);

            updatedJoke.Text = joke.Text;
        }
예제 #2
0
 // Add new joke to list
 private void OnJokeAdded(JokeDetailViewModel viewModel, Joke joke)
 {
     Jokes.Add(new JokeViewModel(joke));
     SortJokesDesc();
 }