public async Task DeleteTest() { var fakeRepository = Mock.Of <IDirectorRepository>(); var directorService = new DirectorService(fakeRepository); int directorId = 1; await directorService.DeleteAndSave(directorId); }
public async Task <IActionResult> DeleteConfirmed(int id) { await _directorService.DeleteAndSave(id); return(RedirectToAction(nameof(Index))); }