Beispiel #1
0
        public ActionResult <GetLocationById> GetLocationById(int locationID)
        {
            try
            {
                var result = _repository.GetLocationByID(locationID);

                IMapper mapper = EDeliveryProfile.GetLocationByID();

                return(mapper.Map <GetLocationById>(result));
            }
            catch (Exception ex)
            {
                _logger.LogError($"Failed to get the location with the given ID{ex}");
                return(BadRequest("Failed to get the location with the given ID"));
            }
        }