Beispiel #1
0
        public IActionResult CountProfessions()
        {
            var location = GetControllerActionNames();

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