Пример #1
0
        private DataSet RetrieveDataSet(IDatabaseAccessor accessor)
        {
            var collection = new SQLScriptCollection(accessor);

            Schema.FillFreshScriptCollection(collection);
            var dbset = accessor.RetrieveDataSet(collection.ExportCommand());

            if (dbset.Tables.Count > 0)
            {
                for (var i = 0; i < dbset.Tables.Count; i++)
                {
                    if (string.IsNullOrWhiteSpace(collection.Scripts[i].ID))
                    {
                        continue;
                    }
                    dbset.Tables[i].TableName = collection.Scripts[i].ID.ToString();
                }
            }
            return(dbset);
        }