locked
[ServiceOperation] - impossible to include referenced data? RRS feed

  • Question

  • I have a problem:

    Ex: Suppose I have a [ServiceOperation] that returns a single "Album". I want this album to include it's sub entities "Photos". 

     I can get this to work If i don't use the "ServiceOperation" but for scenarios where I do flag my server side method with "[ServiceOperation]" no Photos are returned.

    Is there something i'm missing? 

    (I used the [Include] attribute on Photo and I also did ".Include("Photo")" on  my Linq operation.)

    Sunday, July 12, 2009 2:00 PM

Answers

  •  hi, yes I could use a normal query method but I just felt that since I wanted a single entity the serviceoperation was the way to go.

    If you look at page 44 of RIAServicesOverview.docx you will find that in the new release the query method now supports returning a single entity in addition to IEnumerable and IQueryable.

    Monday, July 13, 2009 9:14 AM

All replies

  • This should be an issue with the framework.  We have disallowed returning Entities via [ServiceOperation].  We should disable a single Entity as well.

     Could you just use normal Query method to do this?

    Monday, July 13, 2009 3:42 AM
  •  hi, yes I could use a normal query method but I just felt that since I wanted a single entity the serviceoperation was the way to go.

    Monday, July 13, 2009 8:54 AM
  •  hi, yes I could use a normal query method but I just felt that since I wanted a single entity the serviceoperation was the way to go.

    If you look at page 44 of RIAServicesOverview.docx you will find that in the new release the query method now supports returning a single entity in addition to IEnumerable and IQueryable.

    Monday, July 13, 2009 9:14 AM
  •  nice! missed that one.

    Monday, July 13, 2009 9:26 AM