我正在设计一个企业解决方案,它由产品范围内的模块化产品组成,首先使用实体框架代码来定义域模型并提供数据访问。服务层中的域逻辑 - 如何最好地引用它并将其公开它
例如解决方案:
ProductRange.Authentication
ProductRange.Gateway
ProductRange.OrderSystem
ProductRange.MarketingSystem
每个产品(解决方案)将有类似的层,目前:
ProductRange.OrderSystem.Model (contains code first POCOs)
ProductRange.OrderSystem.DataContext (contains the dbContext)
ProductRange.OrderSystem.DataAccess (contains the Generic Repository)
ProductRange.OrderSystem.Service.DomainLogic (contains business logic)
ProductRange.OrderSystem.Service.ApplicationLogic (contains application logic)
ProductRange.OrderSystem.Presentation.AdminWebsite
ProductRange.OrderSystem.Presentation.CustomerWebsite
有些产品需要访问域逻辑:
各种溶液中项目特别是他们都需要访问ProductRange.Authentication,而且ProductRange.MarketingSystem需要查询ProductRange.OrderSystem
我想通过WCF服务公开范围内的产品之间的域逻辑。 但我也需要在本地参考产品(例如创建项目参考)。
我应该如何去实施?我应该创建一个WCF服务,例如ProductRange.OrderSystem.WCF调用域逻辑并公开它或者我的域逻辑本身是否是WCF服务?如果是后者,我是否总是必须通过WCF引用我的域逻辑,即使是从本地ApplicationLogic?
我想我正在寻找一些关于什么层的指导以及如何最好地提供解决方案之间的内部连接。
属于http://programmers.stackexchange.com –
问:http://programmers.stackexchange.com/questions/212514/domain-logic-in-service-layer-exposed-as-wcf-service –