The ASP.NET vNext Overview says you can create POCO controllers by injecting IActionResultHelper
:
public class HomeController
{
// Helpers can be dependency injected into the controller
public HomeController(IActionResultHelper resultHelper)
{
Result = resultHelper;
}
private IActionResultHelper Result { get; set; }
public ActionResult Index()
{
return Result.Json(new { message = "Poco controllers!" });
}
}
I'm trying to implement this, however, I cannot find this interface. It appears that is no longer in the source code.
What is the current correct approach for creating POCO controllers?