Esempio n. 1
0
        public async Task <IActionResult> Index()
        {
            var fplService = new FplService();
            IEnumerable <Player> goalkeepers = await fplService.GetGoalkeepersAsync();

            return(Json(goalkeepers));
        }
        public async Task <IActionResult> Index()
        {
            var fplService = new FplService();
            IEnumerable <Player> myPlayers = await fplService.GetPickedPlayersAsync();

            return(Json(myPlayers));
        }
Esempio n. 3
0
        public async Task <IActionResult> Index()
        {
            var fplService = new FplService();
            IEnumerable <Player> forwards = await fplService.GetForwardsAsync();

            return(Json(forwards));
        }
Esempio n. 4
0
        public async Task ExecuteAsync(CancellationToken cancellationToken)
        {
            using (var scope = _serviceProvider.CreateScope())
            {
                var context       = scope.ServiceProvider.GetRequiredService <ApplicationDbContext>();
                var emailInfoList = context.EmailInfo.ToList();

                var entryInfoList = FplService.GetEntryInfo(emailInfoList);

                foreach (var entryInfo in entryInfoList)
                {
                    if (entryInfo.Risers.Count > 0 || entryInfo.Droppers.Count > 0)
                    {
                        await SendMessageToUserEmail(entryInfo.Email, entryInfo.Risers, entryInfo.Droppers);
                    }
                }
            }
        }