public void UpdatePersonContact(int id, PersonContactType personContactType, string value) { var contact = PersonContacts .FirstOrDefault( x => x.Id == id && !x.IsDeleted); if (contact == null) { throw new NotFoundException( StringResource.Contact, StringResource.Id, id); } contact.Update(personContactType, value); }
public void DeletePersonContact(int id) { var contact = PersonContacts .FirstOrDefault( x => x.Id == id && !x.IsDeleted); if (contact == null) { throw new NotFoundException( StringResource.Contact, StringResource.Id, id); } else { contact.Delete(); } }