public IActionResult Lottery() { ViewBag.Features = _featuresSettings; ViewBag.Setup = _setupSettings; ViewBag.NextDraw = long.Parse(_memoryCache.Get("NextDraw").ToString()); ViewBag.Jackpot = _memoryCache.Get("Jackpot"); ViewBag.Players = _participation.GetPlayers(_draws.GetLastDraw()); return(View()); }
public void StoreParticipation(string ticket, string nickname, string address, double amount) { _databaseContext.Participations.InsertOne(new Participation { CreationDate = DateTime.Now, Ticket = ticket, Nickname = nickname, WithdrawAddress = address, Draw = _draws.GetLastDraw(), Amount = amount }); }