Skip to content

Instantly share code, notes, and snippets.

@OksanaH
Last active January 5, 2021 22:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save OksanaH/c44c5d109b2fd06d8dbd689915c37dbc to your computer and use it in GitHub Desktop.
Save OksanaH/c44c5d109b2fd06d8dbd689915c37dbc to your computer and use it in GitHub Desktop.
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