locked
Implementation of a method taking a complex object and returning an entity with its associated children RRS feed

  • Question

  • Hi,

    I think, I hit a limitation of the current RIA services design:

    I have a method: MyEntity DoSomething(MyComplexType _param). It was working greatly with an [Invoke] attribute.

    Now, I had to add to MyEntity some associated entities I populate within the DoSomething method. Everything works fine on the server side, but my client code never see the populated entities.

    After some searches, I found that this is by design. I should use [Query] if I need to get back any entity graph.

    After changing my code to use [Query], it no more compiles because Query methods should take only 'predefined' types as arguments! MyComplexType does not fit that condition!

    Do you know about a way to implement my method using RIA Services?

    Thanks.


    Wednesday, December 26, 2012 1:24 PM

Answers

  • Allowing complex types in a query method is on the list for an Open RIA Services is it happens, but for WCF RIA Services the best solution is to serialize your complex type into a string and send that to the server through a Query method.

    http://www.riaservicesblog.net | RIA Services and MVVM http://bit.ly/pgL97k

    Wednesday, December 26, 2012 4:36 PM