WCF REST to web API [closed]

北战南征 提交于 2019-12-25 08:55:55

问题


I want to migrate from wcf rest services to web API, (around 30 endpoints to be created with 6 complex methods) just want to decide based on the budget (1 month time with one resource) available, which amongst the below would be a better solution.

  1. Writing whole new code for creating web API, just utilizing logic already present in wcf rest services.

  2. Creating API endpoints and calling wcf services inside that.


回答1:


There is no real way to tell for sure without knowing more details (or maybe the entire project).

If you're not sure the time will be enough, one thing you can do is to start with option 2 and then replace each endpoint with the actual code from the WCF service. If one month proves to not be enough, you may end up with a mixed solution (where some methods are implemented in the Web Api and some are wrappers calling the WCF service). However, you will be able to just keep slowly moving the methods back to the Web Api and finish it eventually.



来源:https://stackoverflow.com/questions/46154796/wcf-rest-to-web-api

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!