Based upon this post Make a Global ViewBag, I'm trying to implement the following in ASP.NET Core 2.2. I realize the original post was for MVC 3.
public class CompanyFilter : ActionFilterAttribute
{
public override void OnActionExecuting(ActionExecutingContext filterContext)
{
filterContext.Controller.ViewBag.Company = "MyCompany";
}
}
I'm unable to find in what namespace filterContext.Controller.ViewBag would be defined. Is this still available in ASP.NET Core?