public void ActivateOrDeactivateById(long id, bool active) { Project project = _projectRepository.ActivateOrDeactivateById(id, active); if (active) { _customerRepository.ActivateOrDeactivateById(project.CustomerId, true); project.Plannings = _planningRepository.ReadAllByProjectId(project.Id).ToList(); foreach (var planning in project.Plannings) { _jobRoleRepository.ActivateOrDeactivateById(planning.JobRoleId, true); } } }
public void ActivateOrDeactivateById(long id, bool active) { _customerRepository.ActivateOrDeactivateById(id, active); }