Пример #1
0
        public CandidatesDto SearchPerson(PersonSearchFormDto personSearchFormDto)
        {
            var candidates = _personRepository.Query().
                Where(p => p.Forename.Equals(personSearchFormDto.Forename) &&
                           p.Surname.Equals(personSearchFormDto.Surname));

            if (personSearchFormDto.DateOfBirth != null)
                candidates = candidates.Where(p => p.DateOfBirth.Equals(personSearchFormDto.DateOfBirth.Value));

            return new CandidatesDto(candidates);
        }
Пример #2
0
 private SearchForm(PersonSearchFormDto personSearchFormDto)
 {
     _personSearchFormDto = personSearchFormDto;
 }