SilverLight 2 RIA method to return a simple type

  • Thread starter Thread starter Photon
  • Start date Start date
P

Photon

In my DomainService module I have the following; i'd like to simply return a
string back

public string x()
{
return "X";
}

My Call in another module

DomainServiceA a = new DomainServiceA()
string s = a.x();

Problem:

s is always Null

I've seen that you need to put [ServiceOperation] before the method, can't
find it. Then i've seen it's [Invoke], doesn't do it.

Is it not possible to have stuff that doesn't return a 'IQueryable' or
'IEnumerable' back?

--
Joe Reiss
Jackson Creek Software, Inc.
www.emc2library.com

Live Long and Prosper \\//
 
Figured it out myself. Needed to use [Invoke] and use callback. Thanks to
the multitudes of people who responded.


Photon said:
Sorry, that's SilverLight 3

Photon said:
In my DomainService module I have the following; i'd like to simply
return a string back

public string x()
{
return "X";
}

My Call in another module

DomainServiceA a = new DomainServiceA()
string s = a.x();

Problem:

s is always Null

I've seen that you need to put [ServiceOperation] before the method,
can't find it. Then i've seen it's [Invoke], doesn't do it.

Is it not possible to have stuff that doesn't return a 'IQueryable' or
'IEnumerable' back?

--
Joe Reiss
Jackson Creek Software, Inc.
www.emc2library.com

Live Long and Prosper \\//
 
Photon said:
Figured it out myself. Needed to use [Invoke] and use callback. Thanks
to the multitudes of people who responded.

Next time, you may want to consider posting your question in a forum
where it's on-topic.
 
Back
Top