Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

OutputCache, JsonRequestBehavior in MVC 6

$
0
0

Hi there,

I'm trying out a demo project originally made for MVC 5. It has a controller with an Action method like this:

[OutputCache(Location = OutputCacheLocation.None)]
public ActionResult Comments()
{
return Json(_comments, JsonRequestBehavior.AllowGet);
}

Now I'm trying this code on a new MVC 6 project in VS 2015. OutputCache and JsonRequestBehavior are no longer known inside a MVC 6 controller class.

What would be the replacement bits for this in MVC 6? Am I just missing a using clause in the controller? Currently the MVC 6 controller is referencing (using) Microsoft.AspNet.Mvc;

Thanks in advance for any pointers.

Regards,

-Ed


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>