views:

439

answers:

1

Hello,

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"&gt;
- <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

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

+1  A: 

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

Brad Abrams
This is a WCF Service with SOAP messages. Isn't a way to reuse my domain service to provide a restful api?
Aggelos Mpimpoudis