WCF REST到Web API [英] WCF REST to web API

查看:77
本文介绍了WCF REST到Web API的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想从wcf rest服务迁移到Web API(大约要用6种复杂方法创建30个端点),只是想根据可用的预算(1个月的时间,用一种资源)进行决定,其中包括以下内容:成为更好的解决方案.

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. 使用wcf rest服务中已经存在的逻辑编写用于创建Web API的全新代码.

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

创建API端点并在其中调用wcf服务.

Creating API endpoints and calling wcf services inside that.

推荐答案

在不知道更多详细信息(或整个项目)的情况下,没有真正的方法可以确定.

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

如果不确定时间是否足够,您可以做的一件事是从选项2开始,然后将每个端点替换为WCF服务中的实际代码.如果一个月不够用,您可能会得到一个混合解决方案(其中一些方法在Web Api中实现,而另一些则是包装器调用WCF服务).但是,您将能够继续缓慢地将方法移回Web Api并最终完成.

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.

这篇关于WCF REST到Web API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆