/// <summary> /// get (the) touchpoint id using the outward code /// </summary> /// <param name="theCandidate">the candidate</param> /// <param name="usingScope">using (the logging) scope</param> /// <returns>the LAD code</returns> public async Task <string> GetTouchpointIDFromOutwardCode(string theCandidate, IScopeLoggingContext usingScope) { await usingScope.EnterMethod(); It.IsEmpty(theCandidate) .AsGuard <ArgumentNullException>(nameof(theCandidate)); await usingScope.Information($"seeking postcode via outward code: '{theCandidate}'"); var result = await Postcode.LookupOutwardCodeAsync(theCandidate); It.IsEmpty(result) .AsGuard <NoContentException>(); await usingScope.ExitMethod(); return(await GetTouchpointIDFromPostcode(result.FirstOrDefault(), usingScope)); }