-
-
Save dcomartin/7d0838e7e317e062d65e42518b9172c9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class PlaceOrderHandler(ILogger<PlaceOrderHandler> logger) : | |
| IHandleMessages<PlaceOrder> | |
| { | |
| public Task Handle(PlaceOrder message, IMessageHandlerContext context) | |
| { | |
| logger.LogInformation("Received PlaceOrder, OrderId = {message.OrderId}", message.OrderId); | |
| // This is normally where some business logic would occur | |
| var orderPlaced = new OrderPlaced | |
| { | |
| OrderId = message.OrderId | |
| }; | |
| return context.Publish(orderPlaced); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment