Exemple #1
0
        public async Task <IEnumerable> GetAllSubscribersAsync(string signUpSource)
        {
            var subscribers = await _emailReminderRepository
                              .GetAllListSubscribersAsync(signUpSource);

            return(subscribers.Select(_ => new
            {
                _.SignUpSource,
                _.Email,
                _.CreatedAt
            }));
        }
Exemple #2
0
        public async Task <IEnumerable <EmailReminderExport> > ExportSubscribersAsync(string signUpSource)
        {
            var subscribers = await _emailReminderRepository
                              .GetAllListSubscribersAsync(signUpSource);

            var languages = (await _languageService.GetActiveAsync())
                            .ToDictionary(k => k.Id, v => v.Name);

            return(subscribers.Select(_ => new
                                      EmailReminderExport
            {
                CreatedAt = _.CreatedAt,
                Email = _.Email,
                LanguageName = _.LanguageId.HasValue ? languages[_.LanguageId.Value] : null,
                SignUpSource = _.SignUpSource
            }));
        }