Skip to content

Instantly share code, notes, and snippets.

@dcomartin

dcomartin/outOfProcess.cs

Last active Sep 23, 2020
Embed
What would you like to do?
public class OrdersController : Controller
{
private readonly IAmACommandProcessor _commandProcessor;
public OrdersController(IAmACommandProcessor commandProcessor)
{
_commandProcessor = commandProcessor;
}
[HttpPost("/sales/orders/{orderId:Guid}")]
public IActionResult PlaceOrder([FromRoute]Guid orderId)
{
var request = new PlaceOrder
{
Id = Guid.NewGuid(),
OrderId = orderId,
};
_commandProcessor.Post(request);
return NoContent();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.