I have a check for registration in my RegistrationController:
public class RegistrationController : Controller
{
private readonly IAmARegistrationRepository _RegistrationRepository;
public RegistrationController(IAmARegistrationRepository registrationRepository)
{
_RegistrationRepository = registrationRepository;
}
public bool IsRegistered(string userName)
{
return _RegistrationRepository.IsRegistered(userName);
}
}
How can I check this from my HomeController? Is there a way to access the ControllerBuilder
to pull in the currently open controller if there is one? or to at least be able to generate one using the customer controller factory I've loaded into the ControllerBuilder
in my Global.asax.cs
?