Example #1
0
        public void T3_Add_Data_To_Shards()
        {
            // create some test data in the sharded database
            var connectionString = GetReferenceConnectionString();
            var builder          = new TestDataBuilder(connectionString);

            const int initialTestCustomerID         = 1;
            const int numberOfTestCustomers         = 100;
            const int numberOfTestOrdersPerCustomer = 5;

            builder.AddTestDataInShardSet(TestShardSetName, initialTestCustomerID, numberOfTestCustomers, numberOfTestOrdersPerCustomer);
        }
Example #2
0
        private static void AddTestShardlets(ShardBase shard, ShardSetConfig shardSetConfig,
                                             int initialTestCustomerID, int numberOfTestCustomers, int numberOfTestOrders, int numberOfTestSalesLineNums)
        {
            var shardCatalogConnection =
                new ShardConnection
            {
                ServerInstanceName = shard.ServerInstanceName,
                Catalog            = shard.Catalog,
                UserName           = "******",
                Password           = "******",
                ShardSetName       = shardSetConfig.ShardSetName
            };

            var builder = new TestDataBuilder(GetReferenceConnectionString());

            builder.AddTestSalesOrdersInDatabase(shardCatalogConnection.ConnectionString, initialTestCustomerID, numberOfTestCustomers, numberOfTestOrders);
            builder.AddTestShoppingCartItemsInDatabase(shardCatalogConnection.ConnectionString, initialTestCustomerID, numberOfTestCustomers, numberOfTestSalesLineNums);
        }