Esempio n. 1
0
        public IActionResult Create(EntryDTO entry, int phonebookId)
        {
            _logger.LogInformation($"[Phonebook Controller] Received create contact request, phonebookId:{phonebookId}");
            var result = _phoneService.CreateContact(entry, phonebookId);

            return(Ok(result));
        }
Esempio n. 2
0
        public bool CreateContact(EntryDTO newEntry, int phonebookId)
        {
            try
            {
                return(_phoneService.CreateContact(newEntry, phonebookId));
            }
            catch (Exception ex)
            {
                _logger.LogError($"Exception occurred while creating contact. phonebookId: {phonebookId}, stackTrace: {ex.ToString()}");

                return(false);
            }
        }
Esempio n. 3
0
 public bool CreateContact(EntryDTO newEntry, int phonebookId)
 {
     return(_phoneService.CreateContact(newEntry, phonebookId));
 }