开发者

.NET Entity Framework - will it support cross platform clients?

I'm [finally] starting to look at Microsoft .NET Entity Framework as a database layer for my product. Ideally, I will use it to sit on top of the database and WCF, and be used by a website and rich clients and mobile devices.

Does the current release of EF supoort cross platform clients? Will it work if I build a Mac app, a Linux app, an iPad app, Android app, etc?

Does it work out of the box, or does it require extra coding to support cross platform? Does it require additional footprint installation for oth开发者_JS百科er clients, if supported?


For one of my company's projects we use an MSSQL database, an EF model layer and a WCF layer on top to service a Classic ASP web site (ewwww ;(, an MVC2 web site and a iPhone/iPad application. The simple answer is EF will compile down to a .NET assembly and needs help to be cross platform. If you expose it via a standard (set of) protocol(s), like WCF, you can use it easily. Otherwise you will need to wrap the .NET assembly, on a per platform basis, in some form of interoperability code.


Don't expose any EF-specific implementation outside of your WCF services and it'll work just fine with non-Windows clients.

Use Plain Old CLR Objects (POCO's) for the interfaces to those services (created with the EF POCO Generator if you like) rather than EF's default EntityObject based domain model to ensure no client-side dependency on EF.


It works where you can run the .net framework that is on Windows, and Linux using Mono.

For IPod, Andriod and other mobil devices if you comunicate with the server using WCF/REST you do not need to run the database layer on the mobil device.


You will just need the server piece to support EF, and it probably will need .Net runtime support. Then you will expose your data through a standard protocol like OData. For your client, you will communicate with the protocol.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜