public void UpdateAdvertiserData(int id, SaveAdvertiserMessage message)
 {
     var advertiser = _advertiserRepository.Get(id);
     advertiser.Email = message.Email;
     advertiser.Name = message.Name;
     advertiser.Password = _cryptographyService.Encrypt(message.Password);
 }
        public Advertiser AddNewAdvertiser(SaveAdvertiserMessage message)
        {
            var newAdvertiser = new Advertiser();
            newAdvertiser.Name = message.Name;
            newAdvertiser.Password = _cryptographyService.Encrypt(message.Password);
            newAdvertiser.Email = message.Email;

            _advertiserRepository.Add(newAdvertiser);
            _advertiserRepository.SaveChanges();

            return newAdvertiser;
        }