예제 #1
0
        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);
        }
예제 #2
0
 [HttpGet] // will respond to /api/persons?id={someGuid}
 public PersonModel ById(Guid id) => _dataAccess.Get(id);
예제 #3
0
 public Person GetPerson(PersonIdentityModel id)
 {
     return(PersonDataAccess.Get(id));
 }