阅读背景:

当在控制器构建时不知道存储库时,如何在控制器中注入存储库?

来源:互联网 

I have an application, where I do not know the full list of repositories a controller might need upfront (at the time the controller is constructed). A controller gets a list of "components" to render from the database, and then which additional repositories are needed depends on what "components" the database returns. Is there a way to inject these repositories? I'm using ninject although it probably does not matter.I have an application, where I do not know the




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: