Beispiel #1
0
        public async Task <IActionResult> OnGetDeleteAsync(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            var Question = await _repository.FindQuestionByIdAsync(id);

            if (Question != null)
            {
                await _repository.RemoveQuestionAsync(Question);
            }

            return(RedirectToPage());
        }