//add some random rows to table2
        public void PopulateTable2(string clientCode)
        {
            using (var context = new MigrationDbEntities())
            {

                var table = new Table2();

                table.ACN = RandomString(8);
                table.AddressLine1 = RandomString(50);
                table.AddressLine2 = RandomString(50);
                table.City = "Sydney";
                table.ManagedBy = 5;
                table.Name = "Name " + clientCode;
                table.Phone = "1234567";
                table.Postcode = 2031;
                table.Reserves = 1000;
                table.State = "NSW";
                table.Type = "c";
                table.Website = "www.myob.com";

                context.AddToTable2(table);
                context.SaveChanges();
            }
        }
        //add some random rows to table1
        public void PopulateTable1(string clientCode)
        {
            using (var context = new MigrationDbEntities())
            {

                var table = new Table1();

                table.col2 = RandomString(20) + clientCode;
                table.col2 = RandomString(20) + clientCode;
                table.col3 = RandomString(20) + clientCode;
                table.col4 = RandomString(20);
                table.col5 = RandomString(20);
                table.col6 = RandomString(20);
                table.col7 = RandomString(20);
                table.col8 = RandomString(20);
                table.col9 = RandomString(20);
                table.col10 = RandomString(20);
                table.col11 = RandomString(20);
                table.col12 = DateTime.Now;

                context.AddToTable1(table);
                context.SaveChanges();
            }
        }
        //add some random rows to table3
        public void PopulateTable3(string clientCode)
        {
            using (var context = new MigrationDbEntities())
            {

                Random rnd = new Random();

                var table = new Table3();

                table.Desc  = "Row for client " + clientCode;
                table.Col1 = rnd.Next(1, 100000);
                table.Col2 = rnd.Next(1, 100000);
                table.Col3 = rnd.Next(1, 100000);
                table.Col4 = rnd.Next(1, 100000);
                table.Col5 = rnd.Next(1, 100000);
                table.Col6 = rnd.Next(1, 100000);
                table.Col7 = rnd.Next(1, 100000);
                table.Col8 = rnd.Next(1, 100000);
                table.Col9 = rnd.Next(1, 100000);
                table.Col10 = rnd.Next(1, 100000);
                table.Col11 = rnd.Next(1, 100000);
                table.Col12 = rnd.Next(1, 100000);
                table.Col13 = rnd.Next(1, 100000);
                table.Col14 = rnd.Next(1, 100000);
                table.Col15 = DateTime.Now;

                context.AddToTable3(table);
                context.SaveChanges();
            }
        }