简体   繁体   English

ASP 5 MVC 6 - 优点和缺点:多个Web api服务 - 使用一个或多个项目?

[英]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.

相关问题 ASP.NET Web API中基于属性的路由与命令式路由的具体优缺点是什么? - What are the concrete pros and cons of attribute-based routing vs. imperative routing in ASP.NET Web API? 多个SignalR集线器类型在一个背板上 - 优点/缺点/可扩展性? - Multiple SignalR hub types over one backplane — pros/cons/scalability? 如何在ASP.NET MVC Web Api上使用外部身份验证服务 - How to use external authentication services on a ASP.NET MVC Web Api 将MVC asp.net与Google Map API Web服务集成 - integrate MVC asp.net with google map API web services 在web.config和asp页面中注册用户控件的优点和缺点 - Pros and Cons of registering user controls in web.config vs. asp page ASP.NET登录控件的优缺点? - Pros and cons of the ASP.NET Login Controls? ASP.NET MVC使用NLog记录多个项目 - ASP.NET MVC Use NLog to log for multiple projects 使用Asp.net mvc或Web服务会更好吗? - Would it be better to use Asp.net mvc or web services? 在将Web应用程序保留在一个默认应用程序池中的情况下,拥有专用应用程序池的利弊 - Pros and cons of having dedicated application pools over keeping web applications in one default app pool 如何在ASP.NET MVC和ASP.NET Web Pages 2项目中使用现有的三层逻辑? - How to use existing 3-layered logic in ASP.NET MVC and ASP.NET Web Pages 2 projects?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM