Beispiel #1
0
        public Bet MakeBet(BetRequest request)
        {
            var bet = new Bet
            {
                SelectionId = request.SelectionId,
                BetValue    = request.BetValue,
                UserId      = request.UserId
            };

            _context.Bets.Add(bet);
            _context.SaveChanges();

            return(bet);
        }
Beispiel #2
0
 public void Create(IEnumerable <SportEvent> events)
 {
     _context.SportEvents.AddRange(events);
     _context.SaveChanges();
 }