Ejemplo n.º 1
0
        public async Task <ActionResult <PersonDto> > FindById(string id)
        {
            var exist = await _person.PersonExist(id);

            if (!exist)
            {
                return(BadRequest("Person not found"));
            }


            var user = await _person.FindPerson(id);

            var personID  = user.Id;
            var phoneList = await _phone.FindAllUserNumber(personID);

            var EmailList = await _email.FindAllUserEmails(personID);

            var person = new PersonDto(user, phoneList, EmailList);


            return(Ok(person));
        }