Exemplo n.º 1
0
        public async Task <string> GetNewGiud()
        {
            string guid = GlobalHelpers.GetShortGuid;

            while (await ExamRepo.FindBy(a => a.Code == guid).CountAsync() > 0)
            {
                guid = GlobalHelpers.GetShortGuid;
            }
            return(guid);
        }
Exemplo n.º 2
0
        public async Task <Exam> GetExamwithQuestionsWithAnswers(string code)
        {
            var exam = await ExamRepo.FindBy(a => a.Code == code).FirstOrDefaultAsync();

            return(exam != null ? await GetExamwithQuestionsWithAnswers(exam.Id) : null);
        }