I'm writing helper class and inject in in _ViewImports
with
@inject HtmlHelperInject.TestHelper TestHelper
And register in Startup.ConfigureServices
with
services.AddTransient<TestHelper>();
How can I obtain ViewContext
in this helper class? I tried injecting via controler - not working, via [ViewContext]
attribute on property - not working.