public async Task <string> GetNewGiud() { string guid = GlobalHelpers.GetShortGuid; while (await ExamRepo.FindBy(a => a.Code == guid).CountAsync() > 0) { guid = GlobalHelpers.GetShortGuid; } return(guid); }
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); }