Skip to content

Instantly share code, notes, and snippets.

Created April 6, 2022 21:08
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
public class ExternalOrderIntegration
private readonly IMessageSession _messageSession;
private readonly HttpClient _httpClient;
public ExternalOrderIntegration(IMessageSession messageSession, HttpClient httpClient)
_messageSession = messageSession;
_httpClient = httpClient;
public async Task PlaceOrder()
var response = await _httpClient.GetAsync("");
var externalOrder = await response.Deserialize<ExternalOrder>();
var placeOrder = new PlaceOrder
OrderId = externalOrder!.Id,
// Translation to convert an external order or PlaceOrder command
await _messageSession.Send(placeOrder);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment