public void StartMeUp()
 {
     IDbHelper helper = null; // new DbHelper(MyConnectionStrings.EasementsDev);
     IDbProvider dbprovider = new SqlServerProvider(helper);
     DatabaseSchema db = new DatabaseSchema(dbprovider);
     ActiveRecordTestGenerator bliss = new ActiveRecordTestGenerator(new NameProvider());
     foreach (TableSchema table in db.Tables)
     {
         Console.WriteLine("Building " + table.Name + "Tests");
         bliss.Generate(Console.Out, "Crap.Data", table);
     }
 }
 public void Can_generate_associations()
 {
     string connString = "integrated security=SSPI;server=(local);database=Lars";
     var dbprovider = new SqlServerProvider(new DbHelper(connString));
     var configOptions = new DefaultConfigurationOptions();
     var generator = new AwishModelGenerator(); //new ConfigurableActiveRecordGenerator(configOptions);
     generator.ConfigOptions = configOptions;
     //foreach (var tbl in dbprovider.GetTableSchemas().Where(tbl => { return tbl.PrimaryKey != null; }))
     //{
     var tbl = dbprovider.GetTableSchema("LeasePaymentDescriptorLease");
     //var fkrefs = tbl.PrimaryKey.ForeignKeyReferences;
     //foreach (var fkref in fkrefs)
     //{
     //
     //}
     var theNs = new NamespaceDeclaration("Awish.Lars.Data");
     var cdecl = generator.Generate(theNs, tbl);
     new CodeBuilder().GenerateCode(Console.Out, "Awish.Lars.Data", cdecl);
     //}
 }