/// <summary> /// update a user info /// </summary> /// <param name="smsDTO"></param> public void UpdateSms(SmsDTO smsDTO) { if (smsDTO == null || smsDTO.Id == Guid.Empty) { throw new ArgumentException(Messages.warning_CannotUpdateSmsWithEmptyInformation); } //get persisted item var persisted = _smsRepository.Get(smsDTO.Id); if (persisted != null) //if customer exist { //materialize from customer dto var current = MaterializeSmsFromDto(smsDTO); //Merge changes _smsRepository.Merge(persisted, current); //commit unit of work _smsRepository.UnitOfWork.Commit(); } else { LoggerFactory.CreateLog().LogWarning(Messages.warning_CannotUpdateNonExistingSms); } }