通用 WCF 数据服务向 Silverlight 客户端公开大量 SQLite 数据库
是否可以编写一个通用服务来公开多个 SQLite 数据库的内容,而无需在设计时了解数据库的结构?
我一直在阅读本系列的 关于自定义数据服务提供商的博客文章;这看起来是一个有效的起点吗?
如果这是可能的,我们是否能够在网格内的 Silverlight 客户端中显示 SQLite 数据库中特定表的内容?
该项目的目的是让我们的用户能够像使用本机查询工具一样导航 SQLite 数据库的内容。
Would it be possible to write a generic service to expose the contents of a number of SQLite databases, without knowing the structure of the databases at design-time?
I've been reading this series of blog posts about custom data service providers; would this seem like a valid starting point?
If this is possible, would it be possible for us to be able to display the contents of a particular table in the SQLite database in a Silverlight client within a grid?
The purpose of this project is to allow our users to navigate the contents of the SQLite databases, in the same way as using a native query tool.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的,您可以编写自定义数据服务提供程序来执行此操作。当 wcf 数据服务请求元数据时,您可以查看表架构并返回表的结构。事实上,如果跨请求对基础表进行了更改,您可以更改元数据。
以下链接可帮助您入门:http://blogs.msdn.com/b/alexj/archive/2010/01/07/data-service-providers-getting-started.aspx
希望这会有所帮助。
谢谢
普拉蒂克
Yes, you can write a custom data service provider to do this. When wcf data services asks for metadata, you can look at the table schema and return whatever the structure of the table is. In fact, you can change the metadata if there are changes made to the underlying table also across requests.
Here's the link that should help you get started: http://blogs.msdn.com/b/alexj/archive/2010/01/07/data-service-providers-getting-started.aspx
Hope this helps.
Thanks
Pratik