[英]ASP 5 MVC 6 - Pros and cons: multiple web api services - use one or more projects?
I want to migrate my WCF
services to Web API / MVC6
. 我想将我的
WCF
服务迁移到Web API / MVC6
。
Currently I have one application hosting multiple WCF web services ( http://{ip}/{app}/Service{x}.svc/{vs_endpoint}
). 目前我有一个托管多个WCF Web服务的应用程序(
http://{ip}/{app}/Service{x}.svc/{vs_endpoint}
)。 This model is pretty good, we can separate the public services from internal services and we have control over each service in particular, although they all are under one single application. 这个模型非常好,我们可以将公共服务与内部服务分开,我们可以特别控制每个服务,尽管它们都在一个应用程序中。
Would I be able to achieve similar thing in Web API / MVC6
, having one project for multiple services? 我是否能够在
Web API / MVC6
实现类似的Web API / MVC6
,有多个服务的项目? From my initial investigations I understood I would need to do something along these lines . 从我最初的调查中我了解到我需要做这些事情。
If yes, it would be nice to have some recommendations how to structure this project. 如果是,那么建议如何构建这个项目会很好。
Also, can you share some pros and cons about one vs multiple projects to host these services? 另外,您是否可以分享一个与多个项目相关的优缺点来托管这些服务?
Thank you in advance! 先感谢您!
Yes you can achieve this by using either separate controllers or logically grouping controllers into areas. 是的,您可以通过使用单独的控制器或将控制器逻辑分组到区域来实现此目的。 Once you start programming you will automatically came to know that how it is possible and easier to do than wcf.
一旦你开始编程,你将自动了解它比wcf更可行和更容易。 good luck...
祝好运...
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.