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)); }
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); } }
public bool CreateContact(EntryDTO newEntry, int phonebookId) { return(_phoneService.CreateContact(newEntry, phonebookId)); }