# Controller with too many parameters with DI [closed]

Is there a way to reduce the number of parameters of this constructor? All the services must be used in this Controller. The majority of them are used more than 2 times(some of them >10), with the exception of IService7 that is used only in one method.

public class MyController : CustomBaseApiController
{

public MyController(IService1 service1, IService2 service2, IService3 service3, IService4 service4, IService5 service5, IService6 service6, IService7 service7, IService8 service8)
{
this.service1 = service1;
this.service2 = service2;
this.service3 = service3;
this.service4 = service4;
this.service5 = service5;
this.service6 = service6;
this.service7 = service7;
this.service8 = service8;
}


All the methods are specific for this controller and no more refactoring into different Controllers should be done. How can I refactor this in order to have fewer parameters? This Controller is heavily tested (using Moq), so, if possible, I would want to keep it easier to mock the dependencies.

• How can we know? There is litterally no context here! – 409_Conflict Sep 14 '17 at 11:48