Ejemplo n.º 1
0
        public async Task Generate()
        {
            foreach (var user in _db.Users.Subscribers())
            {
                //todo generate a beautiful html
                //todo unsubscribe option
                var recordsByFavoriteArtistsAndLabels = _db.Records
                                                        .LatestByFavorites(user)
                                                        .Select(r => $"{r.Artist.Name} - {r.Title} [{r.Label.Name}]");

                await _notificator.Send(user.Email, string.Join(",", recordsByFavoriteArtistsAndLabels));
            }
        }