public void CreatePlayedGamesReport(IRepository <StandingsByDay> dataSource) { var dailyStandings = dataSource .GetAll() .GroupBy(x => x.Team.Name); var standingsPocos = new List <TeamDailyStandingsPoco>(); foreach (var info in dailyStandings) { var standing = new TeamDailyStandingsPoco { TeamName = info.Key }; var gamesPlayed = new List <GamePoco>(); foreach (var game in info) { var gameInfo = new GamePoco { Wins = game.Wins, Loses = game.Loses, PlayedOn = game.Date }; } standingsPocos.Add(standing); } this.xmlHandler.Serialize(standingsPocos, SaveDirectory + "daily-standings.xml"); }
public ActionResult GetGame(Guid id) { GamePoco poco = _logic.Get(id); if (poco != null) { return(Ok(poco)); } else { return(NotFound()); } }