.net - Converting WCF to WEB API : Is it a good idea to reuse the WCF services with a wrapper in WEB API -


this question has answer here:

i want migrate wcf rest services web api. idea have wrapper services, i.e. call wcf services api endpoints? please suggest.

thank you

if services have no wcf specific code , contain business logic, idea. web api controllers wrappers, handle routing, arguments mapping , returning http status code appropriate result.

edit:

if wcf services have wcf specific code, authentication, suggest extracting code infrastructure independent. you'll able use new extracted classes web api controllers.

in case of such massive refactoring, recommend covering whole component integration or end-to-end tests. tests can written on top of existing code , infrastructure. after extracting code , wrapping web api controllers, you'll able run same tests suite make sure there no breaking changes.

regarding authentication in web api, suggest looking @ following so: web api authentication best practice


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -