Example #1
0
        public async ValueTask <RequestResult <Order> > OrderGetById(int id)
        {
            var result = new RequestResult <Order>();

            try
            {
                result.RequestData = await _storage.OrderGetById(id);

                result.RequestData.OrderItems = await _storage.OrderProductsGetByOrderId((int)result.RequestData.Id);

                result.IsOkay = true;
            }
            catch (Exception ex)
            {
                result.ExMessage = ex.Message;
            }
            return(result);
        }