public async Task <IActionResult> Random() { var viewModel = new RandomViewModel(); var randomJoke = await _jokeService.GetRandomJoke(); viewModel.RandomJoke = randomJoke.Joke; return(View(viewModel)); }
public async Task <DadJokeVM> GetRandomJoke() { var vm = new DadJokeVM(); var joke = await _jokeService.GetRandomJoke(); vm.Joke = joke.Joke; return(vm); }
public async Task <JokeModel> Get() { var result = await _service.GetRandomJoke(); return(result); }
public async Task Joke(IDialogContext context, LuisResult result) { await context.PostAsync(await _jokeService.GetRandomJoke()); context.Wait(MessageReceived); }