public Tuple <long, Person, List <Asset>, List <PersonGroupPeople> > GetPersonWitAssets(long personID)
        {
            Person person = FindById(personID);

            AssetOwner assetOwner = repositoryAssetOwner.GetAssetOwnerOfPerson(personID);

            List <Asset> assets = repositoryAsset.GetAllAssetsOfAssetOwner(assetOwner.AssetOwnerID);

            //Then check if person is member of any group(s)
            List <PersonGroupPeople> personGroupPeoples = repositoryPersonGroupPeople.GetGroupPeoplesOfPerson(personID);

            //om dan te kunnen checken of van iedere group ook assets aan gelinkt zijn (foreach)
            if (personGroupPeoples != null)
            {
                foreach (var item in personGroupPeoples)
                {
                    AssetOwner assetOwnerGroupPerson = repositoryAssetOwner.GetAssetOwnerOfGroupePeople(item.GroupPeopleID);
                    assets.AddRange(repositoryAsset.GetAllAssetsOfAssetOwner(assetOwnerGroupPerson.AssetOwnerID));
                }
            }

            return(new Tuple <long, Person, List <Asset>, List <PersonGroupPeople> >(personID, person, assets, personGroupPeoples));
        }
 public List <PersonGroupPeople> GetGroupPeoplesOfPerson(long personID)
 {
     return(repository.GetGroupPeoplesOfPerson(personID));
 }