public async Task <IActionResult> Details(string orderId) { var order = await _ordersApi.GetOrderById(Guid.Parse(orderId)); order.ImageString = ConvertAndFormatToString(order.ImageData); foreach (var detail in order.OrderDetails) { detail.ImageString = ConvertAndFormatToString(detail.FaceData); } return(View(order)); }
public async Task <OrderViewModel> GetOrderById(Guid orderId) { try { return(await _restClient.GetOrderById(orderId)); } catch (ApiException ex) { if (ex.StatusCode == HttpStatusCode.NotFound) { return(null); } throw; } }