public void DeleteTest(Test test)
        {
            GTest              gTest             = _mapping[test];
            List <GQuestion>   questionsToDelete = new List <GQuestion>();
            List <GAnswer>     answersToDelete   = new List <GAnswer>();
            List <GTestResult> resultsToDelete   = new List <GTestResult>();

            foreach (GQuestion gQuestion in gTest.GQuestion)
            {
                foreach (GAnswer gAnswer in gQuestion.GAnswer)
                {
                    answersToDelete.Add(gAnswer);
                }
                questionsToDelete.Add(gQuestion);
            }
            foreach (GTestResult gTestResult in gTest.GTestResult)
            {
                resultsToDelete.Add(gTestResult);
            }
            foreach (GAnswer gAnswer in answersToDelete)
            {
                _dbContext.GAnswer.Remove(gAnswer);
            }
            foreach (GQuestion gQuestion in questionsToDelete)
            {
                _dbContext.GQuestion.Remove(gQuestion);
            }
            foreach (GTestResult gTestResult in resultsToDelete)
            {
                _dbContext.GTestResult.Remove(gTestResult);
            }
            _dbContext.GTest.Remove(gTest);
            _mapping.Remove(test);
            _dbContext.SaveChanges();
        }
        public void SaveTest(Test test)
        {
            GTest gTest = new GTest(test);

            _mapping.Add(test, gTest);
            _dbContext.GTest.Add(gTest);
            _dbContext.SaveChanges();
        }