public bool ValidateExistPerson(InPersonCreateDTO personDTO, bool returnException = true)
        {
            var person = _personDA.Get(personDTO.IdentificationTypeId, personDTO.IdentificationNumber);

            if (returnException && person.Result != null)
            {
                throw new BusinessException("The person is already registered.", StatusCodes.Status400BadRequest);
            }

            return(person.Result != null);
        }
Beispiel #2
0
 [HttpGet] // will respond to /api/persons?id={someGuid}
 public PersonModel ById(Guid id) => _dataAccess.Get(id);
Beispiel #3
0
 public Person GetPerson(PersonIdentityModel id)
 {
     return(PersonDataAccess.Get(id));
 }