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)))); }
public void PreloadCreatedDependencies(UserTable createdUserTable) { CreatedUserTables.Add(createdUserTable.Namespace); if (createdUserTable.Catalog != null) { CreatedForeignKeys.UnionWith(createdUserTable.Catalog.Schemas.SelectMany(p => p.UserTables.SelectMany(q => q.ForeignKeys.Select(r => r.Namespace)))); return; } if (UserTable.ObjectCount(createdUserTable) == 0) { return; } CreatedForeignKeys.UnionWith( createdUserTable.ForeignKeys.Select( foreignKey => foreignKey.Namespace)); }