Ejemplo n.º 1
0
        public async Task <bool> DeleteTest(int id)
        {
            var test = await testRepository.GetTest(id);

            if (test == null)
            {
                return(false);
            }
            test.isDelete = true;
            testQuestionRepository.SetValueIsDeleteOnTest(id);
            answersRepository.SetValueIsDeleteOnTest(id);
            testRepository.Update(test);
            await testRepository.SaveChangesAsync();

            return(true);
        }