When route hijacking a document type with a RenderMvcController,
Is it possible for me to somehow inject my own repository into the controllers constructor.
For example,
public XYZ_DocController : RenderMvcController {
public XYZ_DocController(IMyRepository things, IPublishedContent content) : base(content) {
}
}
Is there a way to rejister my repository as a Dependency (like with Unity) so that when umbraco instantiates my RenderMvcController it passes in an instance of things and content?
Or do I have to create a singleton repository pattern and call them myself without referrencing them in the constructor (old school way)?
Route Hijacking - Adding controller repositories
When route hijacking a document type with a RenderMvcController,
Is it possible for me to somehow inject my own repository into the controllers constructor.
For example,
Is there a way to rejister my repository as a Dependency (like with Unity) so that when umbraco instantiates my RenderMvcController it passes in an instance of things and content?
Or do I have to create a singleton repository pattern and call them myself without referrencing them in the constructor (old school way)?
You can see here documentation here
Awesome, thanks
is working on a reply...