【发布时间】:2010-03-25 15:13:11
【问题描述】:
public class TheController : Controller
{
IThe the;
public TheController( IThe the)
{
//when User.IsInRole("r1") The1 should be injected else r2
this.the = the;
}
}
public class The1 : IThe{}
public class The2 : IThe{}
//anybody knows a good way of doing this ?
【问题讨论】:
标签: asp.net-mvc dependency-injection inversion-of-control castle-windsor ioc-container