locked
How to access a WCF Data Service from an ASP.NET Dynamic Data Application? RRS feed

  • Question

  • User1432255915 posted

    Hi,

    Instead of using the EntityDataSource to access the model (.edmx) directly, I would like to fetch and update data through a WCF Data Service.

    Howver, I cannot find any data source that would be suitable for that. I believe the DomainDataSource is to be used with WCF RIA services.

    Could someone please shed some light?

    Cheers

    C

     

     

    Sunday, January 22, 2012 8:01 PM

Answers

  • User1641955678 posted

    I had indeed done a prototype of this a while back. You can find it on http://aspnet.codeplex.com/. Specifically, go to the sources (e.g. browse them here), and go under Dynamic Data / Future / Experimental / Astoria.

    "Astoria" was the code name for WCF Data Services at the time.

    Note that this was a prototype and not production code, so it may be in somewhat rough form.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, January 23, 2012 1:04 PM
  • User1641955678 posted

    Indeed, there is no direct support for it.

    I just moved a more complete project to github: https://github.com/davidebbo/DynamicDataWCFDataService. This has a ready-to-run sample. I just tried it in VS2010 and it ran fine. It uses EF on the server.

    This is just a sample, but hopefully it can be helpful to you.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, January 23, 2012 1:27 PM

All replies

  • User-330204900 posted

    you have to use the Domain Service version of the Dynamic data Project template to get this you install WCF RIA Services as the project uses the DomainServiceDataSource

    Monday, January 23, 2012 5:48 AM
  • User1432255915 posted

    Hi sjnaughton,

    Thanks for the reply.

    Maybe my question was not clear but I do not want to use WCF Ria Services.

    I need to use something that will work with the WCF Data Service.

    I am not sure if you are aware but there is a huge difference betwee WCF Data Service and WCF RIA Service. In my case I need to use WCF Data Service to access and change data.

    Has anyone been able to use WCF Data Service with ASP.NET Dynamic Data? How 

    Cheers

    C

     

     

     

    Monday, January 23, 2012 6:07 AM
  • User-330204900 posted

    Then I think you can't but I will ask around to make sure :)

    Monday, January 23, 2012 9:37 AM
  • User1432255915 posted

    Hi sjnaughton,

    Thanks.

    Please let me know what you find out. I really need to know if this is possible or not.

    Cheers

    C

     

     

    Monday, January 23, 2012 10:06 AM
  • User-330204900 posted

    Apprently David Ebbo sis some sample and you may fine what you among them here http://aspnet.codeplex.com/releases/view/54273 I will have a look when I get a moment.

    Monday, January 23, 2012 12:16 PM
  • User1432255915 posted

    Hi sjnaughton,

    I had a quick look at the sample descriptions but none of them state that they are using WCF Data Service to fetch the data. It is going to be a pity if we cannot use WCF Data Service with ASP.NET Dynamic Data.

    Cheers

    C

     

     

    Monday, January 23, 2012 12:34 PM
  • User1641955678 posted

    I had indeed done a prototype of this a while back. You can find it on http://aspnet.codeplex.com/. Specifically, go to the sources (e.g. browse them here), and go under Dynamic Data / Future / Experimental / Astoria.

    "Astoria" was the code name for WCF Data Services at the time.

    Note that this was a prototype and not production code, so it may be in somewhat rough form.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, January 23, 2012 1:04 PM
  • User1432255915 posted

    Hi davidebb,

    Many thanks for providing the link for us.

    Wow!! I think what you tried to do was to create a new data source called DataServiceLinqDataSource that derives from the LinqDataSource.

    So if you tried to do that is because there is no support for WCF Data services in Dynamic data, right?

    Have you tried to use your solution anywhere? Is it hard? Do you have any tutorials or sample/demo application use in VS 2010 and EF?

    Cheers

    C

     

     

     

     

     

    Monday, January 23, 2012 1:14 PM
  • User1641955678 posted

    Indeed, there is no direct support for it.

    I just moved a more complete project to github: https://github.com/davidebbo/DynamicDataWCFDataService. This has a ready-to-run sample. I just tried it in VS2010 and it ran fine. It uses EF on the server.

    This is just a sample, but hopefully it can be helpful to you.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, January 23, 2012 1:27 PM
  • User1432255915 posted

    Hi Davidebb,

    I cannot find words to thank you for providing this demo and help.

    I will have a look at it tomorrow since it is getting late here and let you know how I get on.

    Again, many thanks

    Cheers

    C

     

     

    Monday, January 23, 2012 2:15 PM
  • User1432255915 posted

    Hi David,

    There is more than one item there. Which one shall I download?

    I cannot see anything called "DynamicDataWCFDataService".

    Cheers

    C

     

    Monday, January 23, 2012 2:18 PM
  • User1432255915 posted

    Sorry, I got it.

    Monday, January 23, 2012 2:20 PM
  • User1641955678 posted

    If you're not familiar with git or generally don't want to deal with it, you can just download the zipped sources directly using this link.

    Monday, January 23, 2012 3:11 PM