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().value+mydatacollection2.tolist().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
Post a Comment