Example #1
0
 private static void AddCriterion(IQuery query, string selector, StringValues selectorValues)
 {
     if (selectorValues.Count > 1)
     {
         query.Add(Criterion.In(selector, selectorValues));
     }
     else
     {
         query.Add(Criterion.Eq(selector, selectorValues.FirstOrDefault()));
     }
 }
Example #2
0
 public int Add(PlayerStats playerStats)
 {
     return(_query.Add(INSERT, new Dictionary <string, object>
     {
         { "playerId", playerStats.PlayerId }
     }));
 }
Example #3
0
 public int Insert(GameDetails gameDetails)
 {
     return(_query.Add(INSERT, new Dictionary <string, object>
     {
         { "managerName", gameDetails.ManagerName }
     }));
 }
Example #4
0
 public int Add(PlayerAttribute playerAttribute)
 {
     return(_query.Add(INSERT, new Dictionary <string, object>
     {
         { "playerId", playerAttribute.PlayerId },
         { "attributeId", playerAttribute.AttributeId },
         { "attributeValue", playerAttribute.AttributeValue }
     }));
 }
Example #5
0
 public int Add(Season season)
 {
     return(_query.Add(INSERT, new Dictionary <string, object>
     {
         { "completed", season.Completed },
         { "gameDetailsId", season.GameDetailsId },
         { "startYear", season.StartYear }
     }));
 }
Example #6
0
 public int Add(TeamSeason teamSeason)
 {
     return(_query.Add(INSERT, new Dictionary <string, object>
     {
         { "divisionId", teamSeason.DivisionId },
         { "gameDetailsId", teamSeason.GameDetailsId },
         { "seasonId", teamSeason.SeasonId },
         { "teamId", teamSeason.TeamId },
         { "position", teamSeason.Position }
     }));
 }
Example #7
0
 public int Insert(MatchEvent matchEvent)
 {
     return(_query.Add(INSERT, new Dictionary <string, object>
     {
         { "matchId", matchEvent.MatchId },
         { "teamId", matchEvent.TeamId },
         { "minute", matchEvent.Minute },
         { "playerId", matchEvent.PlayerId },
         { "eventType", matchEvent.EventType }
     }));
 }
Example #8
0
 public int Insert(MatchGoal matchGoal)
 {
     return(_query.Add(INSERT, new Dictionary <string, object>
     {
         { "matchId", matchGoal.MatchId },
         { "teamId", matchGoal.TeamId },
         { "minute", matchGoal.Minute },
         { "playerId", matchGoal.PlayerId },
         { "assistPlayerId", matchGoal.AssistPlayerId },
         { "ownGoal", matchGoal.OwnGoal }
     }));
 }
Example #9
0
 public int Add(Team team)
 {
     return(_query.Add(INSERT, new Dictionary <string, object>
     {
         { "cash", team.Cash },
         { "divisionId", team.DivisionId },
         { "name", team.Name },
         { "stadiumCapacity", team.StadiumCapacity },
         { "yearFormed", team.YearFormed },
         { "gameDetailsId", team.GameDetailsId },
         { "formationId", team.FormationId }
     }));
 }
Example #10
0
 public int Add(News news)
 {
     return(_query.Add(INSERT, new Dictionary <string, object>
     {
         { "divisionId", news.DivisionId },
         { "gameDetailsId", news.GameDetailsId },
         { "seasonId", news.SeasonId },
         { "teamId", news.TeamId },
         { "playerId", news.PlayerId },
         { "week", news.Week },
         { "newsText", news.NewsText }
     }));
 }
Example #11
0
 public int Insert(Transfer transfer)
 {
     return(_query.Add(INSERT, new Dictionary <string, object>()
     {
         { "gameDetailsId", GameCache.GameDetailsId },
         { "playerId", transfer.PlayerId },
         { "seasonId", transfer.SeasonId },
         { "teamFromId", transfer.TeamFromId },
         { "teamToId", transfer.TeamToId },
         { "week", transfer.Week },
         { "transferValue", transfer.TransferValue },
         { "status", transfer.Status }
     }));
 }
Example #12
0
 public int Insert(Match match)
 {
     return(_query.Add(INSERT, new Dictionary <string, object>
     {
         { "gameDetailsId", match.GameDetailsId },
         { "seasonId", match.SeasonId },
         { "divisionId", match.DivisionId },
         { "week", match.Week },
         { "homeTeamId", match.HomeTeamId },
         { "awayTeamId", match.AwayTeamId },
         { "homeTeamScore", match.HomeTeamScore },
         { "awayTeamScore", match.AwayTeamScore },
         { "attendance", match.Attendance }
     }));
 }
Example #13
0
 public int Add(Player player)
 {
     return(_query.Add(INSERT, new Dictionary <string, object>
     {
         { "age", player.Age },
         { "injuredWeeks", player.InjuredWeeks },
         { "suspendedWeeks", player.SuspendedWeeks },
         { "position", player.Position },
         { "name", player.Name },
         { "rating", player.Rating },
         { "retired", player.Retired },
         { "teamId", player.TeamId },
         { "value", player.Value },
         { "gameDetailsId", player.GameDetailsId }
     }));
 }
Example #14
0
 public static bool Add(IQuery queryObject)
 {
     return(queryObject.Add(con));
 }