views:

940

answers:

1

I am just trying to learn .Net RIA Service, so i am creating one hello world example. Now in domainserviceclass i am using below code

[ServiceOperation]

public string SayHello()

{

    return "Hello RIA World!";

}

It is giving me error for reference, i have tried to search on the net but i am unable to identify that which namespace i am missing.

I know it is a very small problem but i am unable to find anything on this error.

+4  A: 

In the PDC09 drop of RIA services (ie. the beta) ServiceOperation was renamed to Invoke.

There's a document which outlines Breaking Changes from July CTP to PDC 2009

From that document:

ServiceOperation renamed to Invoke Convention introduced for Invoke operation

In the PDC bits ServiceOperation has been renamed to Invoke: - ServiceOperationAttribute -> InvokeAttribute i.e. [ServiceOpration] -> [Invoke] - DomainOperation.ServiceOperation -> DomainOperation.Invoke

Also a Convention has been introduced for Invoke operations. Any public method on a Domain Service that is not a [Query], [Insert], [Update], [Delete] or [Custom] method and has only Base Types or collection of Base Types in this signature will be treated as a [Invoke].

The Invoke attribute lives in the System.Web.DomainServices namespace in System.Web.DomainServices.dll.

jbloomer
Thanks, can you suggest any good resource for learning RIA services
Harryboy
Try these:The Get Started site (http://silverlight.net/getstarted/riaservices/)The Silverlight.Net Forum for RIA Services ( http://forums.silverlight.net/forums/53.aspx)Brad Abrams blog (http://blogs.msdn.com/brada/default.aspx) who has a good series of posts on RIA.
jbloomer