我可以使用RIA服务实体框架4.3? [英] Can I use RIA Services with Entity Framework 4.3?

查看:155
本文介绍了我可以使用RIA服务实体框架4.3?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我的设置:
MVC应用程序
使用Enitity框架code首先数据访问层的域模型
Silverlight应用程序(在MVC应用程序中显示)

我使用RIA服务,使Silverlight应用程序与数据库进行交互。

RIA服务只支持实体框架4.1的现在。当前版本为4.3。似乎是一种浪费得不到EF新功能(如迁移和在未来有望支持ENUM)刚刚becouse河口服务为Silverlight应用程序的。

因此​​,我的问题是:


  1. 是否合理依靠利雅服务首先使用EF code时(即他们会总是这么多的落后?难道这是在路上出了问题?)

  2. 你有一个替代解决方案,其中Silverlight应用程序并不是那么依赖我用什么ORM的版本?


解决方案

RIA服务可与NHibernate或任何其他的ORM或对象/领域模型中。只有一些VS奇才意味着有EF和RIA Services之间的耦合,但显然你并不需要使用这些向导,也没有EF和RIA服务。

之间的耦合

在回答这个问题:我可以使用RIA服务实体框架4.3?绝对是肯定的。

的OData是RIA Services的另一种选择,但它有相当多的限制和不作为直接的竞争对手。 WCF也是一种选择。

This is my setup: MVC app A domain model with a data access layer using Enitity Framework Code First Silverlight application (displayed in the MVC App)

I'm using RIA Service to make the Silverlight App interact with the DB.

Ria services only supports entity framework 4.1 as of now. Current release is 4.3. Seems to be a waste to not get the new features of EF (like migrations and hopefully enum support in the future) just becouse of the Ria service for the Silverlight app.

My question is therefore:

  1. Is it reasonable to rely on the Ria Service when using EF code first (i.e. will they always lag behind by so much? Could this be a problem down the road?)
  2. Do you have an alternative solution where the Silverlight app is not so dependent on what version of the ORM i use?

解决方案

RIA Services can be used with NHibernate or any other ORM or object/domain model. Only some of the VS Wizards imply there is coupling between EF and RIA Services, but you clearly aren't required to use those wizards nor is there a coupling between EF and RIA Services.

The answer to the question "Can I use RIA Services with Entity Framework 4.3?" is absolutely yes.

OData is an alternative to RIA Services, but it has quite a few limitations and is not intended as a direct competitor. WCF is also an alternative.

这篇关于我可以使用RIA服务实体框架4.3?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆