Exemplo n.º 1
0
 public LinqGenerator(Solution.Solution solution, SchemaFactory dbInfo)
     : base(solution, dbInfo)
 {
     LinqDirectory = Path.Combine(Solution.BaseDirectory, "LINQ");
     if (!Directory.Exists(LinqDirectory))
         Directory.CreateDirectory(LinqDirectory);
 }
 public FluentNHGenerator(Solution.Solution solution, SchemaFactory dbInfo)
     : base(solution, dbInfo)
 {
     FNHDirectory = Path.Combine(Solution.BaseDirectory, "FNH");
     if (!Directory.Exists(FNHDirectory))
         Directory.CreateDirectory(FNHDirectory);
 }
Exemplo n.º 3
0
 private void Button1Click(object sender, EventArgs e)
 {
     if (string.IsNullOrWhiteSpace(textBox1.Text))
     {
         MessageBox.Show("You need to supply a connection string");
         return;
     }
     _schemaFactory = SchemaFactory.CreateSchemaFactory(textBox1.Text);
     foreach (var tbl in _schemaFactory.DataBase.Tables)
     {
         tbl.GetPrimaryKeys();
         tbl.GetForeignKeys();
     }
     MessageBox.Show("Database has been loaded");
 }
Exemplo n.º 4
0
 public static SchemaFactory CreateSchemaFactory(string connectionString)
 {
     _instance = new SchemaFactory(connectionString);
     return _instance;
 }
Exemplo n.º 5
0
 public HBMGenerator(Solution.Solution solution, SchemaFactory dbInfo)
     : base(solution, dbInfo)
 {
 }
 public AbstractGenerator(Solution.Solution solution, SchemaFactory dbInfo)
 {
     Solution = solution;
     DBInfo = dbInfo;
 }