コード例 #1
0
        public IActionResult CountOffers()
        {
            var location = GetControllerActionNames();

            try
            {
                _logger.LogInfo($"{location}: Attempted Call");
                var offers = _offerRepository.Count();
                //var response = _mapper.Map<IList<OfferDTO>>(offers);
                _logger.LogInfo($"{location}: Successful");
                return(Ok(offers));
            }
            catch (Exception e)
            {
                return(InternalError($"{location}: {e.Message} - {e.InnerException}"));
            }
        }