Ejemplo n.º 1
0
        public async Task <LearnerMatchResult> MatchLearner(long ukprn, long uln)
        {
            var result = await ulnLearnerMatcher.MatchUln(uln).ConfigureAwait(false);

            if (result.DataLockErrorCode.HasValue)
            {
                return(result);
            }

            var dataLockErrorCode = await ukprnMatcher.MatchUkprn(ukprn).ConfigureAwait(false);

            if (dataLockErrorCode.HasValue)
            {
                return new LearnerMatchResult
                       {
                           DataLockErrorCode = dataLockErrorCode
                       }
            }
            ;

            return(result);
        }
    }
        public async Task <LearnerMatchResult> MatchLearner(long ukprn, long uln)
        {
            var result = await ulnLearnerMatcher.MatchUln(uln).ConfigureAwait(false);

            return(result.DataLockErrorCode.HasValue ? result : ukprnMatcher.MatchUkprn(ukprn, result.Apprenticeships));
        }