WCF RIA 服务和现有库

发布于 2024-09-30 21:57:08 字数 217 浏览 0 评论 0原文

我正在开发 Silverlight 应用程序。 SL 应用程序将使用来自 WCF RIA 服务和 EF 的数据。 WCF RIA 和 EF 本身工作正常。但现在我想使用现有库中的一些函数。因为在这个现有的库中,已经实现了很多检查和逻辑。所以我不想重写 WCF RIA 中的所有内容。这些现有的函数是返回DataTable。

是否可以使用WCF RIA中现有的库?我该如何实施?

提前致谢。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

花开柳相依 2024-10-07 21:57:08

是的,您可以在 RIA 服务中实现自定义方法。我要做的是在 RIA 服务中创建一个包装函数来包装现有的调用。进行现有调用后,您可以将结果映射到实体类型(现有的或新的),然后将其作为结果返回。

以下是创建自定义方法的示例:
链接

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文