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);
        }
예제 #2
0
 public Task CreateAsync(Advertiser user)
 {
     _advertiserRepository.Add(user);
     return(_advertiserRepository.SaveChangesAsync());
 }