Exemplo n.º 1
0
        public ApiGamePlay(GameDetail gameDetail)
        {
            Game = gameDetail.Game;

            HomeTeam = new TeamStats
            {
                TeamAbbreviation    = gameDetail.HomeGameTeam.Abbreviation.First(),
                TeamNickName        = gameDetail.HomeGameTeam.NickName.First(),
                PointsQ1            = gameDetail.HomePointsQ1.Sum(),
                PointsQ2            = gameDetail.HomePointsQ2.Sum(),
                PointsQ3            = gameDetail.HomePointsQ3.Sum(),
                PointsQ4            = gameDetail.HomePointsQ4.Sum(),
                PointsOvertimeTotal = gameDetail.HomePointsOvertimeTotal.Sum(),
                PointsTotal         = gameDetail.HomePointsTotal.Sum(),
                TimeoutsUsed        = gameDetail.HomeTimeoutsUsed.Sum(),
                TimeoutsRemaining   = gameDetail.HomeTimeoutsRemaining.Sum()
            };

            VisitorTeam = new TeamStats
            {
                TeamAbbreviation    = gameDetail.VisitorGameTeam.Abbreviation.First(),
                TeamNickName        = gameDetail.VisitorGameTeam.NickName.First(),
                PointsQ1            = gameDetail.VisitorPointsQ1.Sum(),
                PointsQ2            = gameDetail.VisitorPointsQ2.Sum(),
                PointsQ3            = gameDetail.VisitorPointsQ3.Sum(),
                PointsQ4            = gameDetail.VisitorPointsQ4.Sum(),
                PointsOvertimeTotal = gameDetail.VisitorPointsOvertimeTotal.Sum(),
                PointsTotal         = gameDetail.VisitorPointsTotal.Sum(),
                TimeoutsUsed        = gameDetail.VisitorTimeoutsUsed.Sum(),
                TimeoutsRemaining   = gameDetail.VisitorTimeoutsRemaining.Sum()
            };

            Drives           = gameDetail.Drives;
            Plays            = gameDetail.Plays;
            ScoringSummaries = gameDetail.ScoringSummaries;
        }
Exemplo n.º 2
0
 public DbGamePlay(GameDetail gameDetail)
 {
     _gameDetail = gameDetail;
 }