public async Task <IActionResult> DeleteConfirmed(DeleteTestTemplateViewModel deteDeleteTestTemplateViewModel) { var deletedTest = await _testsRepository.DeleteAsync(deteDeleteTestTemplateViewModel.Id); if (!deletedTest) { return(NotFound()); } return(RedirectToAction(nameof(Index))); }
public async Task <IActionResult> DeleteConfirmed(int id) { await _repository.DeleteAsync(id); return(RedirectToAction("Index")); }