//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();
            }
        }
 /// <summary>
 /// Create a new Table2 object.
 /// </summary>
 /// <param name="id">Initial value of the Id property.</param>
 /// <param name="managedBy">Initial value of the ManagedBy property.</param>
 /// <param name="name">Initial value of the Name property.</param>
 /// <param name="aCN">Initial value of the ACN property.</param>
 /// <param name="phone">Initial value of the Phone property.</param>
 /// <param name="website">Initial value of the Website property.</param>
 /// <param name="addressLine2">Initial value of the AddressLine2 property.</param>
 /// <param name="postcode">Initial value of the Postcode property.</param>
 /// <param name="city">Initial value of the City property.</param>
 /// <param name="state">Initial value of the State property.</param>
 /// <param name="type">Initial value of the Type property.</param>
 /// <param name="reserves">Initial value of the Reserves property.</param>
 public static Table2 CreateTable2(global::System.Int32 id, global::System.Int32 managedBy, global::System.String name, global::System.String aCN, global::System.String phone, global::System.String website, global::System.String addressLine2, global::System.Int32 postcode, global::System.String city, global::System.String state, global::System.String type, global::System.Decimal reserves)
 {
     Table2 table2 = new Table2();
     table2.Id = id;
     table2.ManagedBy = managedBy;
     table2.Name = name;
     table2.ACN = aCN;
     table2.Phone = phone;
     table2.Website = website;
     table2.AddressLine2 = addressLine2;
     table2.Postcode = postcode;
     table2.City = city;
     table2.State = state;
     table2.Type = type;
     table2.Reserves = reserves;
     return table2;
 }
 /// <summary>
 /// Deprecated Method for adding a new object to the Table2 EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToTable2(Table2 table2)
 {
     base.AddObject("Table2", table2);
 }