Beispiel #1
0
        public static void Build(
            Catalog catalog,
            DbConnection connection,
            IMetadataScriptFactory metadataScriptFactory)
        {
            Get(catalog, connection, metadataScriptFactory);
            if (catalog.Schemas.Count == 0)
            {
                return;
            }

            UserDefinedDataTypeAdapter.Get(catalog, connection, metadataScriptFactory);
            UserTableAdapter.Build(catalog, connection, metadataScriptFactory);
            ModuleAdapter.Get(catalog, connection, metadataScriptFactory);
        }
Beispiel #2
0
        public static async Task BuildAsync(
            Catalog catalog,
            DbConnection connection,
            IMetadataScriptFactory metadataScriptFactory,
            CancellationToken cancellationToken = default(CancellationToken))
        {
            cancellationToken.ThrowIfCancellationRequested();
            await GetAsync(catalog, connection, metadataScriptFactory, cancellationToken);

            if (catalog.Schemas.Count == 0)
            {
                return;
            }

            await UserDefinedDataTypeAdapter.GetAsync(catalog, connection, metadataScriptFactory, cancellationToken);

            await UserTableAdapter.BuildAsync(catalog, connection, metadataScriptFactory, cancellationToken);

            await ModuleAdapter.GetAsync(catalog, connection, metadataScriptFactory, cancellationToken);
        }