Skip to content

Instantly share code, notes, and snippets.

@OksanaH
Last active January 5, 2021 22:46
Embed
What would you like to do?
OrderController.cs
[ApiController]
[Route("[controller]")]
public class OrderController : ControllerBase
{
private readonly OrderApiGateway orderGateway;
public OrderController(OrderApiGateway orderGateway)
{
this.orderGateway = orderGateway;
}
[HttpGet]
public IActionResult Get()
{
var orderNumber = orderGateway.GetOrderNumber();
return Ok($"Your order number is {orderNumber}");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment