Hierarchical Data on RIA Services


hello all,

i have followed article "business apps example silverlight 3 rtm , .net ria services july update: part 21: hierarchical data", brad abrams, i'm still facing dificulties in perfoming simple task in application.

i have generated domain service class entities (using entity framework). change 1 of automatically generated services include navigation property:

 

public iqueryable<productionorder> getproductionorders()          {              return this.objectcontext.productionorders.include("repositorypieces");          }      
  


 in adition, included [include] atribute in repositorypieces property of produtionorder metadata information.
tested method in silverlight application , working. have productionorders retrieved repositorypieces included.
problem created custom method (in same domain service class) declared as:

 

 [invoke]  public productionorder getfirstproductionorder()  {    return this.objectcontext.productionorders.include("repositorypieces").first();              }
 

 when call sl application, productionorder returned, no repositorypieces. have checked first productionorder in list have repositorypieces...


why not working? please not in real cenario not returning first element. simplify explanation.

kindly regards,

igor.
 

you should not retrive entities via invoke operation. remove invoke , things should work. if you're using older ria services version might have put entitiy inside iqueriable...



Silverlight  >  WCF RIA Services with Silverlight



Comments

Popular posts from this blog

Conditional formatting a graph vertical axis in SSRS 2012 charts

Register with Power BI failed

SQL server replication error Cannot find the dbo or user defined function........