The problem:
I get the following error when I build:
"'.Controllers.ControllerBase' does not contain a constructor that takes 0 arguments"
My base controller looks like this:
public abstract class ControllerBase : Controller
{
public CompanyChannel<IAuthorizationService> authorizationServiceClient;
public ControllerBase(CompanyChannel<IAuthorizationService> authService)
{
this.authorizationServiceClient = authService;
}
}
An example controller that makes use of the Base..
public partial class SearchController : ControllerBase
{
protected CompanyChannel<IComplaintTaskService> complaintTaskServiceChannel;
protected IComplaintTaskService taskServiceClient;
protected ComplaintSearchViewModel searchViewModel;
#region " Constructor "
public SearchController(CompanyChannel<IComplaintTaskService> taskService, CompanyChannel<IAuthorizationService> authService, ComplaintSearchViewModel viewModel)
: base(authService)
{
searchViewModel = viewModel;
this.complaintTaskServiceChannel = taskService;
this.taskServiceClient = complaintTaskServiceChannel.Channel;
}
#endregion
public virtual ActionResult Index()
{
return View();
}
}
This seems to be tripping T4MVC.
Should I just not be passing params into the base constructor?