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