コード例 #1
0
        private void ReinitializeRepository()
#endif
        {
            Customers = new CustomerRecords
            {
                CustomerList = new List <Customer>
                {
                    new Customer  {
                        Id = 1, UserName = "******", Password = "******"
                    },
                    new Customer  {
                        Id = 2, UserName = "******", Password = "******"
                    }
                },
                CustomerCurrentId = 2
            };

            ShoppingCarts = new List <ShoppingCart>
            {
                new ShoppingCart {
                    CustomerId = 1, ProductItems = new List <ProductItem>()
                },
                new ShoppingCart {
                    CustomerId = 2, ProductItems = new List <ProductItem>()
                }
            };

            _jsonHandler.SaveRecords(_customerJsonFile, Customers);
            _jsonHandler.SaveRecords(_shoppingCartJsonFile, ShoppingCarts);
        }
コード例 #2
0
        public async Task <IActionResult> Customers(string tableId)
        {
            ViewBag.TableId = tableId;

            CustomerRecords records = await TableRecordsAPIClient.GetRecrds <CustomerRecords>(tableId);

            return(View(records));
        }