Ejemplo n.º 1
0
        public async Task <IActionResult> GetStudios()
        {
            var location = GetControllerActionNames();

            try
            {
                _logger.LogInfo($"{location}: Attempted Call");
                var studios = await _studioRepository.FindAll();

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