Last post May 01, 2012 04:11 PM by kadkhoda
Jan 10, 2012 06:10 PM|WishStar99|LINK
Hello,I'm developing a silverlight app using WCF Ria service. My WCF Ria service is hosted on serverA and the silverlight app is hosted on serverB. First, i create a WCF service and in my silverlight app, i added the referece to the WCF service. I added the crossdomain files and able to access the functions in the service. Good.
Back to my WCF service in VS 2010, i added the ADO.NET Entity Data Model and the Domain Service. VS creates a few files refencing the tables i selected. I compiled the service and update the new files to serverA.Back to my silverlight app in VS. I updated the service reference. Good, no error. Now, how do i use the Ria doman service? I've seen a few samples where they add the ADO.NET Entity Data and the Domain Service within the Silverlight app. Do i misunderstand the Ria service? Or do i have to call the WCF function then within that function to manipulate the DomainServcie object?
Any input is apprecated .. thank you.
Jan 12, 2012 02:34 AM|Peter pi - MSFT|LINK
There are twi key concepts in WCF RIA Services.
Domain Context – This is the client side counterpart to the domain service. It is generated code on the client side that gives you easy access to the functionality that resides on the server side.
DomainDataSource – This is a data source object that can be used to execute queries and submit changes to the server side. It gets associated with the domain context and makes calls through that domain context on your behalf to query and update entities
If you want to call your RIA domain service, you need to create an instance of the domain context class that will be used to call the domain service. For more about this, you can refer to this article.
Jan 12, 2012 06:27 PM|WishStar99|LINK
thanks for the reply.
"It is generated code on the client side that gives you easy access to the functionality that resides on the server side." ... in my case, it will not be on the client, because I added the ADO.NET Data Service and Domain service in the WCF project
which is hosted on serverA. And the Silverlight is hosted on serverB.
All of the WCF Ria samples I have seen so far is that the ADO.NET Data Service and Domain Service are added to the Silverlight project.
Jan 12, 2012 08:11 PM|WishStar99|LINK
Okay, I found a Linq to SQL sample. That works too =) Thanks.
May 01, 2012 04:11 PM|kadkhoda|LINK
Hi, I have the same problem but still havn't found the solution, would you please give the details of the solution?
Thanks in advance