コード例 #1
0
        public async Task <PharmacyModel> FindClosestAsync(PharmacyInputModel pharmacyInput)
        {
            _logger.LogDebug("Invoked Builder FindClosestAsync");
            var data = await _pharmacyRepository.FindClosestPharmacyAsync(pharmacyInput.Latitude, pharmacyInput.Longitude);

            if (data == null)
            {
                _logger.LogDebug("Builder null FindClosestAsync successful");
                return(null);
            }

            _logger.LogDebug("Builder FindClosestAsync successful");
            return(new PharmacyModel
            {
                Name = data.Name,
                Address = data.Address,
                Distance = data.Distance
            });
        }