I have a simple Asp.net MVC helper method in App_Code.
@helper ApprovedStatus(TimeWorkedEntry entry)
{
if (!entry.Authorised)
{
var approvers = <<get list of approvers from service here >>
<a tabindex="0"
role="button"
class="exclamation"
data-html="true"
data-toggle="popover"
data-trigger="focus"
title="<b>Not yet approved</b>"
data-content="@approvers">
!
</a>
}
}
My services are normally injected into the controllers within my application by Simple Injector.
What i cannot workout is how to get an instance of my services injected into a helper method. What is it I am missing?