Example #1
0
        public IActionResult Generate()
        {
            ModelGenerator mg = new ModelGenerator();

            List <Product>  products  = mg.GenerateProducts();
            List <Customer> customers = mg.GenerateCustomers();
            List <Order>    orders    = mg.GenerateOrders(customers.Select(cust => cust.Id).ToList(), products);

            _dataProvider.CleanHouse();

            _dataProvider.BulkInsert(products);
            _dataProvider.BulkInsert(customers);
            _dataProvider.BulkInsert(orders);

            return(Content("Done"));
        }