public async Task <bool> RestoreTest(int id) { var test = await testRepository.RestoreTest(id); if (test == null) { return(false); } testQuestionRepository.SetValueIsNotDeleteOnTest(id); answersRepository.SetValueIsNotDeleteOnTest(id); test.isDelete = false; testRepository.Update(test); await testRepository.SaveChangesAsync(); return(true); }