public async Task <Commitments> GetApprenticeshipDetails(long apprenticeshipId) { _logger.LogDebug($"Get details from approval about apprenticeship Id : {apprenticeshipId}"); var apprenticeshipResponse = await _commitmentsApiClient.GetApprenticeship(apprenticeshipId); var apprenticeshipDetails = _mapper.Map <Commitments>(apprenticeshipResponse); _logger.LogDebug($"Get details from cosmos db about course : {apprenticeshipResponse.CourseCode}"); var courseDetails = await _documentSession.Get <ApprenticeshipCourse>(apprenticeshipResponse.CourseCode); apprenticeshipDetails.CourseLevel = courseDetails?.Level ?? 0; return(apprenticeshipDetails); }
public async Task <ApprenticeshipCourse> GetApprenticeshipCourse(string courseId) { return(await _documentSession.Get <ApprenticeshipCourse>(courseId)); }
public async Task <AccountEstimationModel> Get(long accountId) { return(await _documentSession.Get <AccountEstimationModel>(accountId.ToString())); }