Return content-negotiated content of the data based on Accept header. Supports: application/json - using JSON.NET text/xml - Xml as XmlSerializer XML text/html - as text, or an optional View text/plain - as text
public static NegotiatedResult Negotiated(Controller controller, object data)
Return Value
serialized data
Parameters
controller
data
Data to return
Example
public ActionResult GetCustomers() { return this.Negotiated( repo.Customers.OrderBy( c=> c.Company) ) }
Overloads:
See also:
Class NegotiatedResultExtensions© West Wind Technologies, 1996-2016 • Updated: 12/12/15
Comment or report problem with topic