예제 #1
0
        public IActionResult CountStudios()
        {
            var location = GetControllerActionNames();

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