title: Web API - Rendering Razor view by default?
body: <p>How do I get Web API to render a Razor view using the model that it returns? And only XML/JSON when the accept headers (or .extension) is set? Is this even possible? </p>
  
  <p>It seems crazy to require one set of controllers for rendering HTML and another for JSON/XML if they're working on the same models.</p>
  
  <p><strong>Update</strong> Darrel Miller has already written a <a href="https://github.com/WebApiContrib/WebAPIContrib/blob/master/src/WebApiContrib.Formatting.RazorViewEngine/ViewEngineFormatter.cs" rel="noreferrer">ViewEngineFormatter for Razor</a> which might do the trick, though haven't tried it yet. </p>