Пример #1
0
        public IActionResult FetchContacts(int userId)
        {
            _logger.LogInformation($"[Phonebook Controller] Received Fetch Contacts request, userId:{userId}");
            var PhoneEntries = _phoneService.GetPhoneEntries(userId);

            return(Ok(PhoneEntries));
        }
Пример #2
0
        public PhoneEntriesDTO GetPhoneEntries(int userId)
        {
            try
            {
                return(_phoneService.GetPhoneEntries(userId));
            }
            catch (Exception ex)
            {
                _logger.LogError($"Exception occurred while fetching contacts. userId: {userId}, stackTrace: {ex.ToString()}");

                throw ex;
            }
        }
Пример #3
0
 public PhoneEntriesDTO GetPhoneEntries(int userId)
 {
     return(_phoneService.GetPhoneEntries(userId));
 }