Exemple #1
0
        public IActionResult AddCustomer([FromBody] Costumer costumer)
        {
            try
            {
                _customerDatabase.insertCostumer(costumer.Firstname, costumer.Surname, costumer.Email, costumer.Address, costumer.City, costumer.Country);
                _notificationServiceClient.PublishNotificationInfo($"Customer {costumer.Firstname} {costumer.Surname} was successfully inserted!");
            }
            catch (BaseMicroserviceException ex)
            {
                return(ex.ToActionResult());
            }

            return(new OkResult());
        }