开发者

A single Domain Model Classes between Desktop and Windows Mobile

开发者 https://www.devze.com 2023-02-15 20:44 出处:网络
I was thinking lately to start a sample project to find a formula between a N Tier app using WCF,Windows Forms,WPF,Compact Framework.

I was thinking lately to start a sample project to find a formula between a N Tier app using WCF,Windows Forms,WPF,Compact Framework. So i decided that the efficient way would be to create a server using WCF Service with maybe numerous bindings for each case (tier maybe).

Now my primary data access since i will have a central database is Entity Framework and i would love to use it for this case too. For the Windows Mobile i will use SQLCe for temporary data and plain ado.net commands (isn't so stupid that we have to use 2 different VS versions?). And I was wondering if anyone came up to these questions.

How to use a single domain having my objects that you could create from the Entity Data Model across all the tiers? Ok this should be easy for everything except where the Windows Mobile app comes they say it supports basicHtpBinding, i dunno how this happens without supporting the [DataContract] attribute.

Is there any template that is known for this kind of job around so I could use it to create my classes where I could manage between the service and windows mobile? Can I use the self tracking template? I guess not, this should go POCO templ开发者_如何学Goate!

When adding the Web Reference of the WCF service in the mobile app I guess it gets the classes needed for the communication. I think there is the svcutil for compact framework that creates a client?

if anyone can help on these questions or has something to add be my guest.

Thank you.


Same problem here, we are using POCO class with EF 4.3 + WCF all BLL centralized on the server that host WS. But separated in diferents projects/layers

n - tier -> Cloud <----> WS Layer (Wcf webservice) <--> BLL <---> DAL(Entity Framework) <---> BD

Poco class are in a shared dll referenced from WS, BLL and DAL... DAL manage the EF dbcontext, dbsets, connection, etc.

0

精彩评论

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