public SubTaskController() { _mainTaskRepository = new MainTaskRepository(); _subTaskRepository = new SubTaskRepository(); _subTaskService = new SubTaskService(_mainTaskRepository, _subTaskRepository); }
public MainTaskService(IMainTaskRepository mainTaskRepository, ISubTaskRepository subTaskRepository, bool initialization = true) { _mainTaskRepository = mainTaskRepository; _subTaskRepository = subTaskRepository; if (initialization) { _mainTaskRepository = new MainTaskRepository(); _subTaskRepository = new SubTaskRepository(); } }