Exemple #1
0
        public async Task <IActionResult> OnPostAsync(int questionId)
        {
            if (!ModelState.IsValid)
            {
                return(Page());
            }

            await questionRepository.AddChoiceAsync(questionId, Choice);

            return(RedirectToPage("/Questions/Edit", new { Id = questionId }));
        }