示例#1
0
        public IActionResult Delete(int id, Quiz deleteQuiz, IFormCollection collection)
        {
            try
            {
                // TODO: Add delete logic here
                _quizRepo.DeleteQuiz(id);

                return(RedirectToAction(nameof(Index)));
            }
            catch (Exception ex)
            {
                _logger.LogError($"Failed to delete a quiz: {ex}");

                return(View());
            }
        }