public async Task <GetDeThiByIdResponse> GetDeThiById(GetDeThiByIdRequest request) { GetDeThiByIdResponse response = new GetDeThiByIdResponse(); response.deThi = await _deThiRepository.GetDeThiById(request.idDeThi); return(response); }
public async Task <GetListCauHoi_DeThiResponse> GetListCauHoi_DeThi(GetListCauHoi_DeThiRequest r) { GetListCauHoi_DeThiResponse response = new GetListCauHoi_DeThiResponse(); IEnumerable <CauHoi> listCauHoi = await _cauHoiRepository.GetListCauHoi_DeThi(r.IdDeThi); if (listCauHoi.ToList().Count == 0) { response.Message = "Câu hỏi không được tìm thấy"; } else { response.CauHois.AddRange(listCauHoi); } response.deThi = await _deThiRepository.GetDeThiById(r.IdDeThi); return(response); }