ASP.NET MVC + WF + WCF +服务层我怎么可以在一个项目中多数民众赞成使用? [英] ASP.NET MVC + WF + WCF + SERVICE LAYER how i can use thats all in one project?

查看:127
本文介绍了ASP.NET MVC + WF + WCF +服务层我怎么可以在一个项目中多数民众赞成使用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经开发了我的最后一个项目像下面由过去的建筑

i have been developed my last project like below as by last architecture

查看 - >控制器 - >服务code - >库与DDD(模型)

View -> Controller -> Service Code -> Repository with DDD(Model)

现在我想用WF和WCF?他们在哪里是我的最后一个架构?请告诉我,告诉我一个例子。

Now i want to use WF and WCF?where are they to be on my last architecture?please tell me show me an example.

推荐答案

主要是我整理我的项目如下:

Mostly I organize my projects as follows:


  • Solution.Core

  • Solution.Configuration

  • Solution.Services

  • 解决方案。presentation

  • Solution.Web

有关这种结构的更多信息可以在弧wiki上找到

More information about this kind of structure could be found at Arc wiki

所有的服务接口和领域实体去的核心的项目。的服务的项目包含实施的应用程序服务的的。的 Contollers 的和的视图模式的是 presentation 的项目。如果我的控制器需要一个服务,我引用它的界面中的控制器的的构造函数,并将其连接到通过的IoC / DI容器真正的实现。

All service interfaces and domain entities goes to Core project. Services project contains implementation of Application Services. Contollers and View Models are in Presentation project. If my controller needs a service I reference it's interface in Controller's constructor and wire it to real implementation via IoC/DI container.

工作流程不会只包含业务逻辑,所以我封装业务逻辑,小型服务/命令并从工作流程调用它们。这使得工作流来的服务的项目。

Workflows won't contain only business logic, so I encapsulate business logic as small services/commands and call them from workflows. That leaves workflows to Services project.

WCF服务的实现应该在的服务的项目,并在接口的核心

WCF services implementations should be in Services project and interfaces in Core.

此方式,它应该看起来像控制器>服务>工作流程>使用其他服务来得到一个结果。

This way it should look like Controller > Service > Workflow > Uses other services to get a result.

有关WCF服务,它需要配置端点,它应该服务>工作流程>使用其他服务来得到一个结果。

For WCF services it's needed to configure endpoint and it should look Service > Workflow > Uses other services to get a result.

这篇关于ASP.NET MVC + WF + WCF +服务层我怎么可以在一个项目中多数民众赞成使用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆