public async Task <IList <ProjectCompany> > GetAllKIKsByProjectCompanyId(int companyId) { var shares = await GetFactForKIKByProjectCompanyId(companyId); return(shares.Where(share => kikCalculator.IsKIKCompany(share)) .Select(share => share.DependentProjectCompany) .ToArray()); }
bool IsKIK(IList <ProjectCompanyFactShare> shares) { foreach (var share in shares) { if (!kikCompanyCalculation.IsKIKCompany(share)) { return(false); } } return(true); }