Wednesday, February 24, 2016

Versioning ASP.NET Web API

If you search the Internet for methods to version ASP.NET Web API services, you will find a slew of solutions to overcome the fact that ASP.NET Web API has no built-in method to support versioning of the services.

However, I came across one interesting solution which leverages custom attributes that I found rather appealing.  Even though it does not directly address this solution for ASP.NET Web API and instead addresses it for ASP.NET MVC, the concept of Route Versioning is the same:

Since it creates a distinctly different Routing attribute for holding the Route version information, it is much clearer than simply embedding route version information directly into specific routing Urls.

Hopefully, in a future release of ASP.NET Web API, a feature like this will be built directly into the ASP.NET Web API framework!!

No comments:

Post a Comment