예제 #1
0
      }//CreateTableClassFile

      //----------------------------------------------------------------------------------------------------//

      /// <summary>
      /// Creeate c# file for table columns as string fields
      /// </summary>
      /// <param name="tableName">Name of table th ecolumns belong to</param>
      private static void CreateColumnClassFile(string tableName)
      {

         var className = tableName.UnderscoreToCamelCase() + "Columns";

         //Get Column names
         var columns = ODBCHelpers.GetColumnNames(ConnectionString, tableName);

         var strFields = CreateFieldsString(columns);

         genny.CreateColumnClass(className, ColumnNamespace, strFields);
      }//CreateColumnClassFile
예제 #2
0
      }//CreateColumnClassFile

      //----------------------------------------------------------------------------------------------------//

      /// <summary>
      /// Creeate c# file for table columns as string fields
      /// </summary>
      /// <param name="tableName">Name of table th ecolumns belong to</param>
      private static void CreateColumnDataClassFile(string tableName)
      {

         var className = tableName.UnderscoreToCamelCase() + "ColumnsData";

         //Get Column names
         var columns = ODBCHelpers.GetAllColumnData(ConnectionString, tableName);

         var strFields = CreateColumnDataFieldString(columns);

         genny.CreateColumnClass(className, ColumnNamespace, strFields, "ColumnData", "using  OdbcSchemaFilesGenerator.Models;");
      }//CreateColumnClassFile
예제 #3
0
      }//CreateColumnClassFile

      //----------------------------------------------------------------------------------------------------//

      private static IEnumerable<string> GetTableNames()
      {
         return ODBCHelpers.GetTableNames(ConnectionString);
      }//GetTableNames