public bool AddMatch(int teamId, MatchResultType result) { if (teamId <= 0 || result.Equals(MatchResultType.All)) { _logger.LogWarning("TeamService.AddMatch: " + TextResources.InvalidTeamInstance); return(false); } return(_teamFactory.AddMatch(teamId, result)); }
public int GetTotals(MatchResultType result) { return((result.Equals(MatchResultType.All)) ? Matches.Count() : Matches.Count(x => x == result)); }