override GetControllerInstance in MVC
- by loviji
I have a code in asp.net MVC v.1:
protected override IController GetControllerInstance(HttpContext null , Type controllerType)
{
string connectionString = ConfigurationManager.ConnectionStrings["someEntities"].ConnectionString;
return Activator.CreateInstance(controllerType, new DataManager(connectionString)) as IController;
}
now I use asp.net mvc v.2. And I know that, now GetController implemented as
public virtual IController CreateController(RequestContext requestContext, string controllerName);
How can return old functionality of upper code?