SilverLight 2 RIA method to return a simple type

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 \\//
 
P

Photon

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 \\//
 
P

Peter Duniho

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top