making obejct queriable RRS feed

  • Question

  • helo

    i building Odata service with data services wth a reflection provider
    if returning a complex type 
    my definition of complex type
    class a that containes class b as a member
    what do i need to do in order to expose both of the types and have the ability to with a query for both of them
    do i need to give every one of the an attribute thst specified the data name?
    for class a and class b?

    thank you and have a nice day

    shlomi hassan 

    Tuesday, August 7, 2012 9:44 PM

All replies

  • Hi,

    OData doesn't support queries on complex values currently. So if you need to support querying on these values, you will have to convert them to entities. Entity (in a reflection provider) is a class which defines a key property (using the DataServiceKey attribute) and for which there's an IQueryable<EntgityType> property on the context class (the entity set for that entity).


    Vitek Karas [MSFT]

    • Proposed as answer by Ian M Williams Monday, August 20, 2012 4:35 PM
    Wednesday, August 8, 2012 10:12 AM