示例#1
0
        public async Task <TransportEntity> GetPhysicalPersonByID(Guid PhysicalPersonID)
        {
            try
            {
                ObjReturn.Sucess = true;
                ObjReturn.Data   = await PhysicalPersonRepository.GetAsync(w => w.ID.Equals(PhysicalPersonID), true, i => i.InternetAddresses, d => d.Documents);

                return(ObjReturn);
            }
            catch (Exception ex)
            {
                ObjReturn.Sucess = false;
                ObjReturn.Messages.Add(ex.Message);
                return(ObjReturn);
            }
        }
        public async Task <PhysicalPersonModel> GetAsync(object id)
        {
            var result = await _personRepository.GetAsync(id);

            return(_personMapper.Map(result));
        }