public ActionResult Place(string userId, string productIds, string shippingTypeId) { var placeOrderCommand = new Sales.Messages.Commands.PlaceOrder() { UserId = userId, ProductIds = productIds.Split(','), ShippingTypeId = shippingTypeId, TimeStamp = DateTime.Now }; MvcApplication.Bus.Send("Sales.Orders.OrderCreated", placeOrderCommand); return(Content("Your Order has been placed.")); }
protected async Task HandleValidSubmit() { var placeOrderCommand = new Sales.Messages.Commands.PlaceOrder { Id = Guid.NewGuid(), UserId = "raf", ProductIds = Order.ProductIds.Split(","), ShippingTypeId = Order.ShippingTypeId, TimeStamp = DateTime.UtcNow }; await CommandBus.Send(placeOrderCommand); await EventBus.Publish(new OrderPlaced { OrderId = placeOrderCommand.Id, UserId = placeOrderCommand.UserId, TimeStamp = DateTime.UtcNow }); NavigationManager.NavigateTo($"placeorderconfirmation/{placeOrderCommand.Id}"); }