void InspectSchema() { var dbInspector = new DbInspector(); dbInspector.LoadFromConfig(); if (dbInspector.SchemaInfo.Tables.Count == 0) { dbInspector.GenerateFromDb("AppDb"); } Application["SchemaInfo"] = dbInspector.SchemaInfo; }
static void Main(string[] args) { Console.WriteLine("Meta Data Generator for DotWeb. Version " + Assembly.GetExecutingAssembly().GetName().Version); if (ConfigurationManager.ConnectionStrings["AppDb"] == null || ConfigurationManager.ConnectionStrings["DotWebDb"] == null) { Console.WriteLine("ERROR: missing connection string name AppDb or DotWebDb in configuration file. Please fix!"); } if (ConfigurationManager.AppSettings["appId"] == null) { Console.WriteLine("ERROR: missing appSettings appId key in configuration file. Please fix!"); } var dbInspector = new DbInspector(); dbInspector.GenerateFromDb("AppDb"); Console.WriteLine("DONE. Press any key to exit this application."); Console.ReadKey(); }