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())); } }
public int Add(PlayerStats playerStats) { return(_query.Add(INSERT, new Dictionary <string, object> { { "playerId", playerStats.PlayerId } })); }
public int Insert(GameDetails gameDetails) { return(_query.Add(INSERT, new Dictionary <string, object> { { "managerName", gameDetails.ManagerName } })); }
public int Add(PlayerAttribute playerAttribute) { return(_query.Add(INSERT, new Dictionary <string, object> { { "playerId", playerAttribute.PlayerId }, { "attributeId", playerAttribute.AttributeId }, { "attributeValue", playerAttribute.AttributeValue } })); }
public int Add(Season season) { return(_query.Add(INSERT, new Dictionary <string, object> { { "completed", season.Completed }, { "gameDetailsId", season.GameDetailsId }, { "startYear", season.StartYear } })); }
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 } })); }
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 } })); }
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 } })); }
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 } })); }
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 } })); }
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 } })); }
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 } })); }
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 } })); }
public static bool Add(IQuery queryObject) { return(queryObject.Add(con)); }