public void Add(ScheduledNotificationDto notificationDto) { var userProfile = _userProfileRepository.Get(p => p.UserLogin == notificationDto.UserLogin); if (userProfile == null) return; var notification = notificationDto.ToScheduledNotification(); notification.UserProfileId = userProfile.Id; _scheduledNotificationRepository.UpdateAndCommit(notification); }
public void Update(ScheduledNotificationDto notificationDto) { var notification = _scheduledNotificationRepository.Get(notificationDto.Id); if (notification != null) { notificationDto.ToScheduledNotification(notification); _scheduledNotificationRepository.UpdateAndCommit(notification); } }