apply $expand to service operation

Posted by Thurein on Stack Overflow See other posts from Stack Overflow or by Thurein
Published on 2010-05-17T06:43:37Z Indexed on 2010/05/17 6:50 UTC
Read the original article Hit count: 196

Filed under:

Hi, I have a service operation in my dataservice, which returns a list of objects. Is it possible to apply $expand to the result.

[WebGet]
    public IQueryable<contact> GetFilterByContactDetailCount(String city)
    {
        var result = from c in CurrentDataSource.Contacts
                 join ca in CurrentDataSource.ContactAddresses on c.ContactID equals ca.ContactID
                 join a in CurrentDataSource.Addresses on ca.AddressID equals a.AddressID
                 where (String.IsNullOrEmpty(city) || a.City.Contains(city)))
                 select c;
        return result.AsQueryable<Contact>();
    }

Thanks Thurein

© Stack Overflow or respective owner

Related posts about wcf-dataservice