示例#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()));
     }
 }
示例#2
0
 public int Add(PlayerStats playerStats)
 {
     return(_query.Add(INSERT, new Dictionary <string, object>
     {
         { "playerId", playerStats.PlayerId }
     }));
 }
示例#3
0
 public int Insert(GameDetails gameDetails)
 {
     return(_query.Add(INSERT, new Dictionary <string, object>
     {
         { "managerName", gameDetails.ManagerName }
     }));
 }
示例#4
0
 public int Add(PlayerAttribute playerAttribute)
 {
     return(_query.Add(INSERT, new Dictionary <string, object>
     {
         { "playerId", playerAttribute.PlayerId },
         { "attributeId", playerAttribute.AttributeId },
         { "attributeValue", playerAttribute.AttributeValue }
     }));
 }
示例#5
0
 public int Add(Season season)
 {
     return(_query.Add(INSERT, new Dictionary <string, object>
     {
         { "completed", season.Completed },
         { "gameDetailsId", season.GameDetailsId },
         { "startYear", season.StartYear }
     }));
 }
示例#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 }
     }));
 }
示例#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 }
     }));
 }
示例#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 }
     }));
 }
示例#9
0
文件: TeamQuery.cs 项目: srog/FMS_Mvc
 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 }
     }));
 }
示例#10
0
文件: NewsQuery.cs 项目: srog/FMS_Mvc
 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 }
     }));
 }
示例#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 }
     }));
 }
示例#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 }
     }));
 }
示例#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 }
     }));
 }
示例#14
0
 public static bool Add(IQuery queryObject)
 {
     return(queryObject.Add(con));
 }