示例#1
0
 public void DistributeScores(Match match, Team team)
 {
     if (match.AwayTeamScore > match.HomeTeamScore && match.Status == MatchStatus.finished)
     {
         team.Scores += 2;
         _context.SaveChanges();
     }
     else if (match.HomeTeamScore > match.AwayTeamScore && match.Status == MatchStatus.finished)
     {
         team.Scores += 2;
         _context.SaveChanges();
     }
     else if (match.HomeTeamScore == match.AwayTeamScore && match.Status == MatchStatus.finished)
     {
         team.Scores += 1;
         _context.SaveChanges();
     }
 }
示例#2
0
 public virtual void Save()
 {
     _context.SaveChanges();
 }