Пример #1
0
        protected override void ExecuteCreateTableScript()
        {
            ScriptGeneratorBase scriptGenerator = ScriptGeneratorFactory.CreateInstance(type, typeof(MsSqlScriptGenerator));
            var script = scriptGenerator.CreateTableScript();

            _connection.Execute(script);
        }
Пример #2
0
        public IEnumerable <TableSchemaInformation> TableColumns(Type type)
        {
            ScriptGeneratorBase scriptGenerator = ScriptGeneratorFactory.CreateInstance(type, typeof(PostgreScriptGenerator));
            string script = scriptGenerator.CreateGetTableColumnsScript();
            IEnumerable <TableSchemaInformation> columns = _connection.Query <TableSchemaInformation>(script);

            return(columns);
        }