public long Create(Contract.Model.Contact contact) { var mappedContact = _contactMapper.MapToApi(contact, null); var wrappedContact = new ContactWrapper(mappedContact); var result = _connector.Create(wrappedContact); return(result.id.Value); }
public Contract.Model.Contact Update(long id, Contract.Model.Contact contact) { var current = _connector.GetById(id); var mappedContact = _contactMapper.MapToApi(contact, current); var wrappedContact = new ContactWrapper(mappedContact); var result = _connector.Update(id, wrappedContact); return(_contactMapper.MapToContract(result)); }