您可以直接从 Silverlight 使用实体框架吗?

发布于 2024-08-13 11:51:56 字数 198 浏览 2 评论 0原文

我在 Silverlight 中看到的每个数据访问示例似乎都在使用 RIA 服务从后端获取实体。是否可以直接从 Silverlight 使用实体框架,或者这是不可能的,因此需要使用 RIA 服务?

与通过 RIA 服务的额外层相比,直接从 Silverlight 针对 SQL Azure 数据库使用实体框架似乎是一种更高效、更灵活的数据处理方式。我在这里缺少什么?

Every example I see of data access in Silverlight seems to be using the RIA Services to get hold of the entities from the back end. Is it possible to use the Entity Framework directly from Silverlight or is that impossible and hence the need to use RIA Services instead?

It would seem that using the Entity Framework directly from Silverlight against a SQL Azure database was a much more efficient and flexible way of handling data than going via the extra layer of RIA Services. What am I missing here?

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

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

发布评论

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

评论(2

再见回来 2024-08-20 11:51:56

不,Silverlight 目前没有直接的数据库访问权限,而且我不认为这是有计划的。您可以使用 RIA 服务或普通的旧式 ADO.NET 数据服务。

No, Silverlight has no direct database access at the moment and I don't believe it's planned. You can use RIA services or plain old ADO.NET Data Services.

护你周全 2024-08-20 11:51:56

您不能直接在 Silverlight 中使用实体框架,原因很简单,您在运行时在客户端工作。

在使用 EF 时,强调您有权访问数据库,但不应将其授予客户端运行时。

迄今为止最好的解决方案是使用 RIA 服务,它提供了一种直观且透明的方式来操作数据,并且与 EF 非常相似。

You can't use Entity Framework directly in Silverlight for the simple reason that you are working on the client side at runtime.

While using EF emphasis that you have access to your database which you should don't grant to a client-side runtime.

The best solution so far is to use the RIA Services which provide an intuitive and transparent way to manipulate your data and very similar to the EF.

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