Exemplo n.º 1
0
        public void SortMessages(Customer customer, string correlationId)
        {
            var bankCust = new BankCustomer()
            {
                FullName     = customer.FirstName + " " + customer.LastName,
                EmailAddress = customer.EmailAddress
            };

            _producer.CreateProducer(bankCust, EndPoints.ToBankQueueName, EndPoints.ToBankRoutingKey, correlationId);
            // Flere producers til andre endpoints
        }
Exemplo n.º 2
0
        public ActionResult Create(Customer customer)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest());
            }

            customer.CustomerId = Guid.NewGuid().ToString();

            _producer.CreateProducer(customer);

            return(View("OrderReceived", customer));
        }