locked
Loading and filtering hiearhical data problem using Ado.Net data services RRS feed

  • General discussion

  • Hi,

    I have database structure like this:
    A
    B
    b1
    b2
    C
    c1
    c2
    D
    d1
    d2
    ...

    A is top level database table and others are related child and grand child tables. I am trying to collect all data for specified A item and B item, but don't know how to filter B items in query. 

    public void LoadAsync(Guid aId, Guid bId) {
    ...
                var query = (from a in
                                ADataContext.A.Expand(
                                 "B/b1,B/b2,B/C/c1,B/C/c2,B/D/d1,b/D/d2)
                             join b in ADataContext.B on a equals b.A
                             where a.Id == aId && b.Id == bId
                             select a);

    }

    Expanding hierarchical items is working good, but I don't know how to filter B items to include only one B item with bId specified. I have tried something with bolded text in upper query but it doesn't work. Any help on this is appreciate...

    Thanks
    Monday, March 2, 2009 11:31 AM

All replies

  • It looks like this is not supported. Expanded database tables can't be filtered in single Url call.
    Tuesday, March 3, 2009 11:07 AM