I am trying to convert an MVC 5 project to MVC 6 with ASP.NET Core. In the old project, I had a static HTML helper class which I used to render inline css.
I used to be able to use HttpContext.Current.Server.MapPath(path)
to get the root outside a controller, but this exists in System.Web
and so is not available to me.
What equivalent can I use in ASP.NET Core to MapPath
outside of a Controller class (ie, I do not have access to IHostingEnvironment
)