silverlightentity-frameworkwcf-ria-services

WCF RIA Services and Existing Library


I’m developing Silverlight application. The SL app is going to consume data from WCF RIA Service and EF. WCF RIA and EF itself is working fine. But now I would like to use some functions from existing library. Because in this existing library, there was already implemented a lot of checking and logic. So I don’t want to rewrite everything in WCF RIA. Those existing functions are return DataTable.

Is it possible to use the existing library in WCF RIA? How can I implement?

Thanks in advance.


Solution

  • Yes, you can implement custom methods in RIA services. What I would do is create a wrapper function in your RIA service that wraps your existing call. After the existing call is made it is then up to you to map the results into an entity type (existing or new), then return this as the result.

    Here is an example of creating a custom method: Link