Exemplo n.º 1
0
Arquivo: Meta.cs Projeto: stazz/CBAM
    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);
    }