WCF Web API和ASP.NET Web API有什么区别 [英] What's the difference between WCF Web API and ASP.NET Web API

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

问题描述

我过去使用WCF WebAPI做过一些工作,并且真的很喜欢它的许多功能,目前我只是在使用ASP.NET Web API,它似乎完全不同(IE完全从WCF).

I've done a bit of work in the past using WCF WebAPI and really liked a lot of its features, I'm just playing with ASP.NET Web API at the moment and it seems completely different (IE completely removed from WCF).

有人知道ASP.NET 4 Web API中包含WCF WebAPI的哪些功能吗?

Does anyone know which features of WCF WebAPI are included in ASP.NET 4 Web API?

推荐答案

我已经做了一些阅读,并发现了一些有关此问题的MS人员的文章:

Ive done a little more reading around this and found a few pages by MS people on this:

WCF Web API抽象大致如下映射到ASP.NET Web API

The WCF Web API abstractions map to ASP.NET Web API roughly as follows

WCF Web API-> ASP.NET Web API

WCF Web API -> ASP.NET Web API

  • 服务-> Web API控制器
  • 操作->操作
  • 服务合同->不适用
  • 端点->不适用
  • URI模板-> ASP.NET路由
  • 消息处理程序->相同
  • 格式化程序->相同
  • 操作处理程序->过滤器,模型绑定器

http://wcf.codeplex.com/discussions/319671

集成堆栈支持以下功能:

The integrated stack supports the following features:

  • 现代HTTP编程模型
  • 完全支持ASP.NET路由
  • 内容协商和自定义格式化程序
  • 模型绑定和验证
  • 过滤器
  • 查询组成
  • 易于单元测试
  • 通过DependencyResolver改进了控制反转(IoC)
  • 基于代码的配置
  • 自托管
  • Modern HTTP programming model
  • Full support for ASP.NET Routing
  • Content negotiation and custom formatters
  • Model binding and validation
  • Filters
  • Query composition
  • Easy to unit test
  • Improved Inversion of Control (IoC) via DependencyResolver
  • Code-based configuration
  • Self-host

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

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