Esempio n. 1
0
        public static SendNotificationViewModel Create(IRepository repository, NotificationTrackingViewModel notificationTrackingViewModel, EmailQueue emailQueue = null, string email = null)
        {
            Check.Require(repository != null, "Repository is required.");
            Check.Require(notificationTrackingViewModel != null, "notificationTrackingViewModel is required.");

            var viewModel = new SendNotificationViewModel()
            {
                NotificationTrackingViewModel = notificationTrackingViewModel,
                EmailQueue = emailQueue ?? new EmailQueue()
                {
                    FromAddress = email
                }
            };

            return(viewModel);
        }
        public static SendNotificationViewModel Create(IRepository repository, NotificationTrackingViewModel notificationTrackingViewModel, EmailQueue emailQueue = null, string email = null)
        {
            Check.Require(repository != null, "Repository is required.");
            Check.Require(notificationTrackingViewModel != null, "notificationTrackingViewModel is required.");

            var viewModel = new SendNotificationViewModel()
                                {
                                    NotificationTrackingViewModel = notificationTrackingViewModel,
                                    EmailQueue = emailQueue ?? new EmailQueue() { FromAddress = email}
                                };

            return viewModel;
        }