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(); } }
public void AddTips(ICollection <Tip> tips) { _context.Tips.AddRange(tips); _context.SaveChanges(); }