private static void EnterJoke(Joke joke = null) { if (joke == null) { joke = new Joke(); } Console.WriteLine("The joke's title:"); joke.Title = Console.ReadLine(); Console.WriteLine("Question:"); joke.Question = Console.ReadLine(); Console.WriteLine("Answer:"); joke.Answer = Console.ReadLine(); if (joke.Id != 0) { _service.UpdateJoke(joke); } else { _service.AddJoke(joke); } }
public void UpdateJoke(Joke joke) { _serviceClient.UpdateJoke(joke); }