Reputation: 1936
Basically, we have an old API that is written as a WCF Rest API which consists of multiple (20 or so) services. We would like to migrate to a WebAPI based solution, however "simply starting over" is not a viable option for many reasons.
So, long story short: Is there some way to replace my old WCF Rest API on a service by service basis with a WebAPI implementation, basically running the two in parallel while migrating bits over?
Specifically, one of the most interesting issues could be making sure the WCF and WebAPI context is synced (as we currently use an extension on OperationContext.Current), so that means we would have to resolve the ContextProvider depending on service used I guess?
Well, if anyone has any inputs I'd be very happy :)
Upvotes: 0
Views: 811
Reputation: 1269
You could create your Web Api services as facades that call your existing WCF services. That way you can start coding clients to your new services while maintaining any legacy code that called your old services. Obviously this entails the overhead of the additional service calls, you could incrementally replace the code behind the facades with your new business logic, etc.
Upvotes: 1