locked
How can I use a Domain Service as ADO.net Data Services data source RRS feed

  • Question

  • Hello, I have a question;

    I created Project that exposes an ADO.Net Data Service, I used an Entity Data Model as data source for my service. It works fine, but now I want to use a Domain Service Class (which is using Entity Data Model for source) as the data sourcefor the service, nothing happens when I try to consume the service using URI's to point to the service Entities. When I point to the service using URI, I do not see entity set. Is this posible to do? I just want to add an extra business logic layer to my app.

    I created a SL Solution using .Net RIA Services, I added a Domain Service Class and Entity Data Model as data source to the SL application, it works fine. Then I added a Domain ADO.Net Data Service to my SL Web application, I used the existing Domain Service Class as data source for my service. It works fine on this project using the Domain Service as the business loging layer. It exposes everithing using URI's, I even removed the SL Project from my solution and still the Data Service still works.

    I just want to know if I can use a business logic in between ADO.Net Data Service and Data Model.

    Thursday, July 30, 2009 10:10 PM

Answers

  • You need to make sure you're referencing System.Data.Services & System.Data.Services.Client version 99.0.0.0 and not the 3.5 versions.
    The prior versions give you no data.

    \Microsoft SDKs\RIA Services\v1.0\Libraries\Server\System.Data.Services.dll
    \Microsoft SDKs\RIA Services\v1.0\Libraries\Server\System.Data.Services.Client.dll

    Also make sure you set Copy local to true when deploying.

    regards, 
      nisbus

    Thanks, nisbus
    Monday, August 31, 2009 9:26 PM

All replies

  • Is it possible to do this? If it is, can somebody send me a sample code. Like I mentioned before, I created a plain Web application (not SL) and added a ADO.net Data Service, Entity Data Model, and Domain Service.

    I am using the Entity Data Model as the DAL and the Domain Service as the BL. When I use the Domain Service as a data source for the the ADO.NET Data Service, it does not expose any data;

     <?xml version="1.0" encoding="utf-8" standalone="yes" ?> 
    - <service xml:base="http://localhost:54015/DomainDataService.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>

    Is it possible to do this in current version of ADO.NET Data Services?

    I appreciate any help on this

    Monday, August 3, 2009 6:35 PM
  • You need to make sure you're referencing System.Data.Services & System.Data.Services.Client version 99.0.0.0 and not the 3.5 versions.
    The prior versions give you no data.

    \Microsoft SDKs\RIA Services\v1.0\Libraries\Server\System.Data.Services.dll
    \Microsoft SDKs\RIA Services\v1.0\Libraries\Server\System.Data.Services.Client.dll

    Also make sure you set Copy local to true when deploying.

    regards, 
      nisbus

    Thanks, nisbus
    Monday, August 31, 2009 9:26 PM
  • You need to make sure you're referencing System.Data.Services & System.Data.Services.Client version 99.0.0.0 and not the 3.5 versions.
    The prior versions give you no data.

    \Microsoft SDKs\RIA Services\v1.0\Libraries\Server\System.Data.Services.dll
    \Microsoft SDKs\RIA Services\v1.0\Libraries\Server\System.Data.Services.Client.dll

    Also make sure you set Copy local to true when deploying.

    regards, 
      nisbus

    Thanks, nisbus

    where can i download 99.0.0.0
    i tried downloading http://blogs.msdn.com/brada/archive/2009/07/15/business-apps-example-for-silverlight-3-rtm-and-net-ria-services-july-update-part-5-astoria-add-reference-and-winforms.aspx
    but there isno System.data.service.dll that is 99.0.0.0
     
    im using 4.0 and it has the same error with tavo2k4
    Wednesday, December 9, 2009 9:52 AM

  • Anybody can help? I encountered the same problem, It's long time.
    Monday, January 17, 2011 2:56 AM