public Joke GetRandomJoke() { var joke = JokeApi.GetJoke(); var jokesRepo = new JokesRepository(_connectionString); if (jokesRepo.NewJoke(joke.Number)) { jokesRepo.AddJoke(joke); } return(jokesRepo.GetByNumber(joke.Number)); }