I am adapting an open source project (NopCommerce). It is a great software and supports extensibility using plugins. For one plugin, I would like to add information to a view, to do that, I want to inherit from the Controller and override the actions I need to change. So this is my controller:
public class MyController : OldController{
//stuff
public new ActionResult Product(int productId)
{
//Somestuff
}
}
I changed the route from my plugin, but when this action get called I get the following error:
The current request for action 'Product' on controller type 'MyController' is ambiguous between the following action methods: System.Web.Mvc.ActionResult Product(Int32) on type MyPlugin System.Web.Mvc.ActionResult Product(Int32) on type OldController
Is there any way I can override this method? (ps: I can't use the override keyword because it is not marked as virtual, abstract or override in the OldController)
thanks, Oscar