I have an MVC controller that has a single constructor, I am using structure map as my IoC container and T4MVC to remove the need for magic strings.
On one view I have the follwing:
@{ Html.RenderAction(MVC.Master.SideBar()); }
@{ Html.RenderAction(MVC.Master.Breadcrumb()); }
The first call runs fine, however, on the second call a new instance of the MasterController is constructed, but rather than using the normal constructor the protected constructor that is generated by T4MVC is called. The leaves all my services null and the Breadcrumb action falls over.
Why might this be happening?