Example #1
0
 private void AddPicksForWeek(FakeGameRepository gameRepository, int weekId)
 {
     int minGameId = gameRepository.Get().Where(x => x.WeekId == weekId).Min(x => x.Id);
     int maxGameId = gameRepository.Get().Where(x => x.WeekId == weekId).Max(x => x.Id);
     int maxTeaserTeamId = 50;
     for (int i = 1; i <= maxTeaserTeamId; i++)
     {
         for (int j = 1; j <= 4; j++)
         {
             Pick p = new Pick();
             p.Id = (list.Count == 0) ? 1 : list.Max(x => x.Id) + 1;
             int gameId = (p.Id % (maxGameId - minGameId + 1)) + minGameId;
             Game g = gameRepository.Get().Where(x => x.Id == gameId).Single();
             p.GameId = g.Id;
             p.TeaserTeamId = i;
             p.ProTeamId = ((j % 2) == 0) ? g.HomeTeamId : g.AwayTeamId;
             list.Add(p);
         }
     }
 }
Example #2
0
 public Pick Save(Pick item)
 {
     throw new NotImplementedException();
 }
Example #3
0
 public bool Delete(Pick item)
 {
     throw new NotImplementedException();
 }
Example #4
0
 public Pick Save(Pick entity)
 {
     throw new NotImplementedException();
 }