public ActionResult Getorders() { var userId = _sessionContext.CurrentUser.UserId.ToString(); var result = _orderRepository.GetOrders(userId); return(JsonSuccess(result.Result, JsonRequestBehavior.AllowGet)); }
public async Task <IActionResult> Index() { var orders = await _ordersApi.GetOrders(); foreach (var order in orders) { order.ImageString = ConvertAndFormatToString(order.ImageData); } return(View(orders)); }
public async Task <List <OrderViewModel> > GetOrders() { return(await _restClient.GetOrders()); }