ASP.Net Web API 2 controller custom content negotiation

By default, web api 2 automatically  delivers xml and json content types without any explicit serialization in controller with the help of content negotiation (conneg).

For example if your controller defines a default Get method that returns some object, on client request this object may be returned as xml or json string without adding explicit serialization code inside the method. Read more