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(); }
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)); } }