Tuesday, July 12, 2016

Custom media content type in MVC Web Api 2

The MVC Web Api is quite powerfull in that it enables us to develop REST web services, however one key factor of REST design principles is  hypermedia as the engine of application state.

To achieve this, a custom media formatter class must be defined in MVC web api 2 project and then add and object of this class to GlobalConfiguration.Configuration.Formatters collection.

An in depth article can be found at

http://www.tugberkugurlu.com/archive/creating-custom-csvmediatypeformatter-in-asp-net-web-api-for-comma-separated-values-csv-format


No comments:

Regex Email validation in c# dot net core

 Use this regex /^_?[a-zA-Z0-9]([a-zA-Z0-9]*[._+-])*[a-zA-Z0-9_]+@(?!-)[A-Za-z0-9-]{1,63}(?<!-)(\.(?!-)[A-Za-z0-9-]{1,63}(?<!-))*\.[A-...