예제 #1
0
        public async Task <IActionResult> DeleteConfirmed(DeleteTestTemplateViewModel deteDeleteTestTemplateViewModel)
        {
            var deletedTest = await _testsRepository.DeleteAsync(deteDeleteTestTemplateViewModel.Id);

            if (!deletedTest)
            {
                return(NotFound());
            }
            return(RedirectToAction(nameof(Index)));
        }
예제 #2
0
        public async Task <IActionResult> DeleteConfirmed(int id)
        {
            await _repository.DeleteAsync(id);

            return(RedirectToAction("Index"));
        }