R – Empty svc file using WCF Ria Services and ADO .NET Data Services

riawcfwcf-data-services

I have a WCF RIA project getting my data from an SQL Server 2008 via Entity framework. Everything is going well. However I would like to access data via a windows mobile so, as far as I can understand I have to create an ADO.NET Data Service. My domain service is called BusinessLogicDomainService.cs. Immediately after creating the corresponding BusinessObjectsDataService I write this:

public class BusinessObjectsDataService : DataService<BusinessObjectsDomainService>
{        
    public static void InitializeService(DataServiceConfiguration config)
    {
        config.SetEntitySetAccessRule("*", EntitySetRights.All);
        config.SetServiceOperationAccessRule("*", ServiceOperationRights.All);
    }    
}

However when I access the svc via browser the only thing I get

 <?xml version="1.0" encoding="utf-8" standalone="yes" ?> 
- <service xml:base="http://localhost:9589/BusinessObjectsDataService.svc/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:app="http://www.w3.org/2007/app" xmlns="http://www.w3.org/2007/app">
- <workspace>
  <atom:title>Default</atom:title> 
  </workspace>
  </service>

Do you have anything in mind on how can I post data in a restful way? Am I doing it wrong with ADO.NET Data Services? I somehow feel that using WCF Ria I have already a restful api but how can I discover it?

Thank you!

Edit: I triple-checked prerequisites on msdn. Msdn says "The type of the DataService<(Of <(T>)>) must expose at least one property that returns an entity set that is an IQueryable<(Of <(T>)>) collection of entity types. This class must also implement the IUpdatable interface to enable updates to be made to entity resources.". A segment of my business domain service is shown in the following picture, which has IQuerable functions:

alt text http://i23.photobucket.com/albums/b352/grnemo/Untitled-15.png

Edit 2: From this I figured out that I am seeking a solution on how to make the RIA service discoverable.

Best Answer

With the lastest drop of RIA Services, a DomainService IS A WCF service. Would just using a WCF Services from Windows Mobile work for you? See: http://blogs.msdn.com/brada/archive/2009/11/22/ria-services-a-domainservice-is-a-wcf-service-add-service-reference.aspx

Related Topic