简体   繁体   English

台式机和Windows Mobile之间的单个域模型类

[英]A single Domain Model Classes between Desktop and Windows Mobile

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. 我最近在考虑启动一个示例项目,以使用WCF,Windows Forms,WPF,Compact Framework在N Tier应用之间查找公式。 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). 因此,我认为有效的方法是使用WCF服务创建一个服务器,每种情况下(可能是每个层)都有许多绑定。

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. 现在,由于我将拥有一个中央数据库,所以我的主要数据访问是Entity Framework,并且我也想在这种情况下使用它。 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?). 对于Windows Mobile,我将使用SQLCe来存储临时数据和简单的ado.net命令(不是很愚蠢,我们必须使用2个不同的VS版本?)。 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. 好的,这一切对其他人来说应该都很容易,除非Windows Mobile应用程序来自哪里,他们说它支持basicHtpBinding。

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? 是否有任何已知的模板可用于此类工作,所以我可以使用它来创建我可以在服务和Windows Mobile之间进行管理的类? Can I use the self tracking template? 我可以使用自我跟踪模板吗? I guess not, this should go POCO template! 我想不是,这应该去POCO模板!

When adding the Web Reference of the WCF service in the mobile app I guess it gets the classes needed for the communication. 在移动应用程序中添加WCF服务的Web参考时,我想它会获取通信所需的类。 I think there is the svcutil for compact framework that creates a client? 我认为有用于创建客户端的紧凑框架的svcutil吗?

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. 同样的问题,我们使用POCO类和EF 4.3 + WCF,所有BLL都集中在托管WS的服务器上。 But separated in diferents projects/layers 但是分隔在不同的项目/层中

n - tier -> Cloud <----> WS Layer (Wcf webservice) <--> BLL <---> DAL(Entity Framework) <---> BD n层->云<----> WS层(Wcf Web服务)<-> BLL <---> DAL(实体框架)<---> BD

Poco class are in a shared dll referenced from WS, BLL and DAL... DAL manage the EF dbcontext, dbsets, connection, etc. Poco类位于从WS,BLL和DAL引用的共享dll中... DAL管理EF dbcontext,dbsets,连接等。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM