Exemplo n.º 1
0
 public async System.Threading.Tasks.Task Save(Notification notification)
 {
     _notificationRepository.Save(notification);
     try
     {
         await _emailService.SendAsync(new IdentityMessage
         {
             Body = notification.Text,
             Destination = notification.User.Email,
             Subject = "Gigbucket notification"
         });
     }
     catch (Exception exception)
     {
         _logger.Error(exception);
     }
 }
Exemplo n.º 2
0
 public void Save(Notification notification)
 {
     _dbContext.Notification.Add(notification);
     _dbContext.SaveChanges();
 }