Beispiel #1
0
    public static async Task <List <ForeignKeyMetadata> > GetCrossReferenceMetadataAsync(this DatabaseMetadata md, String primarySchemaName, String primaryTableName, String foreignSchemaName, String foreignTableName)
    {
        var list = new List <ForeignKeyMetadata>();
        await md.PrepareForeignKeySearch(primarySchemaName, primaryTableName, foreignSchemaName, foreignTableName).EnumerateAsync(async fk => list.Add(await md.ExtractForeignKeyAsync((SQLDataRow)fk)));

        return(list);
    }