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.
精彩评论