Exemplo n.º 1
0
        public void deleteContact(Guid guid)
        {
            SimContact contact = _simContactRepo.findByGuid(guid);

            if (contact == null)
            {
                return;
            }
            this.deleteMobileNumber(contact);
            if (contact.GetType() == typeof(PhoneContact))
            {
                this.deleteContactTags(contact);
            }
            _simContactRepo.Delete(contact);
            _simContactRepo.Save();
        }
Exemplo n.º 2
0
 public IActionResult getContact(Guid guid)
 {
     try
     {
         SimContact             contact       = _simContactRepo.findByGuid(guid);
         contactDetailsExtended clientContact = new contactDetailsExtended(contact);
         return(Ok(JsonConvert.SerializeObject(clientContact)));
     }
     catch (Exception ex)
     {
         return(StatusCode(500, ex));
     }
 }