Question

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

[ServiceOperation]

public string SayHello()
{
    return "Hello RIA World!";
}

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

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

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top