Search code examples
asp.net-web-apiwcf-rest

WCF REST to web API


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.


Solution

  • 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.