开发者

Building a WebService using EF4

A Web Service project can use up to NET 3.5 as far as I have noticed. Now, I want to use Entity framework 4 as a data access technology.

EF4 is available within NET 4.0 only.

Am I missing something or I simply cannot connect Web Services with EF4 ?

Regards Mariusz

ps. Forgiv开发者_运维百科e me if I missed something obvious.


You should have a look at WCF Data Services. They allow you to expose part or all of a EF 4.0 model, to be consumed by a client via a WCF service.

have a look at the following:

WCF Data Service Example

WCF Data Service Overview


You cannot use EFv4 in your web service if you don't upgrade the web service project to .NET 4.0. Programs in .NET 3.5 cannot reference / use assemblies from .NET 4.0. That would require that your .NET 3.5 web service consumes EFv4 data access layer as another web service which would badly affect performance of your solution and highly increase deployment complexity.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜