What are the differences between WebAPI and WebAPI 2

C#.Netasp.net Web-Api

C# Problem Overview


What are the MAIN differences (things I should be concerned about) between WepApi and WepApi2 that now ships with Visual Studio 2013?

C# Solutions


Solution 1 - C#

Major new features are,

> 1. AttributeRouting > 2. OWIN self host > 3. IHttpActionResult > 4. CORS > 5. HttpRequestContext

I had the same question and found simple article about this, here.

Solution 2 - C#

In addition to the features mentioned by iJay

  1. Testability

  2. ODATA Improvements

  3. Filter Overrides

  4. ByteRangeStreamContent

We can differentiate web api and web api2 by using above features.

Solution 3 - C#

WebAPI and WebAPI 2

Actually WebAPI 2.0 is enhanced feature of WebApi there is no difference between this two. In version 2.0, the Web API framework has been enhanced to support the following features:

  • IHttpActionResult return type
  • A new Routing Attribute
  • Support for Cross-Origin requests using CORS
  • Securing ASP.NET Web API using OAuth 2.0
  • Support for $expand, $select in OData Service

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionJason RoellView Question on Stackoverflow
Solution 1 - C#iJayView Answer on Stackoverflow
Solution 2 - C#Edukondalu ThavitiView Answer on Stackoverflow
Solution 3 - C#A.BhagatView Answer on Stackoverflow