RIA returning new objects?


hi,

 i have ria service doing calculations , returning results:

 

public iqueryable getcalculateddata(int mydata1, int mydata2)  {     var returnval = new list();       var mydatacollection = (from x in this.context.mydata x.id = mydata1 select x);     var mydatacollection2 = (from x in this.context.mydata x.id = mydata2 select x);       for(int = 0; < mydatacollection.count(); i++)     {         returnval.add(new mydata         {            value = mydatacollection.tolist()idea.value+mydatacollection2.tolist()idea.value;         });     }     return returnval; //here data correct  }  

 on silverlight app side unexpected results:

private void mydataloaded(loadoperation operation)  {      listbox.itemsource = operation;  }

 in listbox items have same value , first value calculated.

how can return results this?

do need create new domain class can't persisted return these values, or going wrong?

 thanks,

  nisbus

query operations can return entity and ienumerable<t> or  iqueryable<t>, t entity.

if want return array of let's ints can use service operation.

 



Silverlight  >  WCF RIA Services with Silverlight



Comments

Popular posts from this blog

Azure DocumentDB Owner resource does not exist

job syspolicy_purge_history job fail in sqlserver 2008

Trying to register with public marketplace error with 'Get-AzureStackStampInformation'