public static async Task <IActionResult> Run(
            [HttpTrigger(AuthorizationLevel.Function, "get", Route = "orders")] HttpRequest req,
            [Inject] IOrderingService orderingService,
            ExecutionContext context,
            ILogger log)
        {
            log.LogInformation("GetOrders function processed a request.");

            await orderingService.Init(context);

            var orders = await orderingService.GetOrderAsync();

            return(new OkObjectResult(orders));
        }
Beispiel #2
0
 public async Task <ActionResult <Order> > Get(string buyerId, string orderId) =>
 await _serviceOrdering.GetOrderAsync(new GetOrderRequest { OrderId = orderId });