Esempio n. 1
0
        public void PreloadCreatedDependencies(Catalog createdCatalog)
        {
            if (Catalog.ObjectCount(createdCatalog) == 0)
            {
                return;
            }

            CreatedUserTables.UnionWith(
                createdCatalog.Schemas.Select(
                    schema => schema.UserTables)
                .SelectMany(
                    userTables => userTables.Select(
                        userTable => userTable.Namespace)));

            CreatedForeignKeys.UnionWith(createdCatalog.Schemas.SelectMany(p => p.UserTables.SelectMany(q => q.ForeignKeys.Select(r => r.Namespace))));
        }
Esempio n. 2
0
        public void PreloadCreatedDependencies(Schema createdSchema)
        {
            if (Schema.ObjectCount(createdSchema) == 0)
            {
                return;
            }

            CreatedUserTables.UnionWith(
                createdSchema.UserTables.Select(
                    userTable => userTable.Namespace));

            if (createdSchema.Catalog != null)
            {
                CreatedForeignKeys.UnionWith(createdSchema.Catalog.Schemas.SelectMany(p => p.UserTables.SelectMany(q => q.ForeignKeys.Select(r => r.Namespace))));
                return;
            }

            CreatedForeignKeys.UnionWith(
                createdSchema.UserTables.Select(
                    userTable => userTable.ForeignKeys)
                .SelectMany(
                    foreignKeys => foreignKeys.Select(
                        foreignKey => foreignKey.Namespace)));
        }