Esempio n. 1
0
        public Dbo.Game Map(Dto.Game game)
        {
            if (game == null)
            {
                return(null);
            }

            var result = new Dbo.Game
            {
                GameId        = game.Id,
                CompetitionId = game.Competition.Id,
                HomeTeamId    = game.HomeTeam.Id,
                AwayTeamId    = game.AwayTeam.Id,
                HomeTeamGoals = game.HomeTeamGoals,
                AwayTeamGoals = game.AwayTeamGoals,
                Date          = game.Date,
                GameFinished  = game.MatchFinished
            };

            return(result);
        }
Esempio n. 2
0
        public Dto.Game Map(Dbo.Game game)
        {
            if (game == null)
            {
                return(null);
            }

            var result = new Dto.Game
            {
                Id            = game.GameId,
                Competition   = ShortMap(game.Competition),
                HomeTeam      = ShortMap(game.HomeTeam),
                AwayTeam      = ShortMap(game.AwayTeam),
                HomeTeamGoals = game.HomeTeamGoals,
                AwayTeamGoals = game.AwayTeamGoals,
                Date          = game.Date,
                MatchFinished = game.GameFinished
            };

            return(result);
        }