Exemple #1
0
        public void Delete(Guid candidateGuid)
        {
            var candidateGuids = _candidateRepository.GetCandidateIdsByGuid(new[] { candidateGuid });

            _logService.Warn($"Deleting candidate and related application records for candidates with ids: {string.Join(",", candidateGuids.Values)}");

            _applicationRepository.DeleteByCandidateId(candidateGuids.Values);
            _candidateRepository.DeleteByCandidateGuid(candidateGuids.Keys);
        }
Exemple #2
0
        private void BulkDelete(IDictionary <Guid, int> candidateGuids)
        {
            if (candidateGuids.Count == 0)
            {
                return;
            }

            _logService.Warn($"Deleting candidate and related application records for candidates with ids: {string.Join(",", candidateGuids.Values)}");

            _applicationRepository.DeleteByCandidateId(candidateGuids.Values);
            _candidateRepository.DeleteByCandidateGuid(candidateGuids.Keys);
        }