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