使用实体框架和 RIA 服务的动态数据
这个问题是另一个问题的延伸,但我认为它有自己的主题。 请参阅请参阅 Silverlight 问题
我有一个返回动态数据集的存储过程 (SQL 2005) (每次调用时都会有不同的列/模式)。
我想在 Silverlight 3.0 中使用它,因此我需要使用实体框架和 RIA 服务以某种方式连接它。 我还需要它是可绑定的(Silverlight Grid),所以我需要可以通过属性(网格限制)访问这些动态列。 有任何想法吗?
This question is an extension of another question, but I think it warrants its own thread. See See Silverlight Question
I have a stored procedure (SQL 2005) that returns a dynamic data set (different columns/schema) each time it is called.
I want to consume this in Silverlight 3.0 so I need to somehow wire this up using Entity Framework and RIA Services. I also need this to be Bindable (Silverlight Grid) so I need these dynamic columns to be accessible via properties (grid limitation). Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在当前发布的实体框架版本中,您可以映射的唯一存储过程类型是返回实体类型的存储过程类型。 通常,映射是在编译之前完成的,尽管至少理论上可以在运行时生成实体框架元数据。
因此,我看到了一些选择。
In the currently shipping version of the Entity Framework, the only type of stored procedures you can map are those which return entity types. The mapping is done, generally, before you compile, although it seems at least theoretically possible to generate Entity Framework metadata at runtime.
Therefore, I see a few choices.
您可以使用 WCF Web 服务包装器来访问 SP 并使用 WCF 服务作为数据源 Brad Abrams 在其关于 RIA 服务的系列文章中提供了一种方法
You might use a WCF web service wraper for accesing your SP and use the WCF service as data source Brad Abrams has a way to do that on his series of articles on RIA Services