Exemplo n.º 1
0
        public void UpdateMatchResult(long id, int?homeGoals, int?awayGoals)
        {
            var match = _context.Matches.FirstOrDefault(x => x.Id == id);

            if (match != null)
            {
                match.AwayGoals = awayGoals;
                match.HomeGoals = homeGoals;

                _context.Matches.Update(match);
                _context.SaveChanges();
            }
        }
Exemplo n.º 2
0
 public void AddTips(ICollection <Tip> tips)
 {
     _context.Tips.AddRange(tips);
     _context.SaveChanges();
 }