Ejemplo n.º 1
0
        public TeamEntity ToEntity(Team team)
        {
            SportEntity convertedSport = sportConverter.ToEntity(team.Sport);
            TeamEntity  convertedTeam  = new TeamEntity(team.Id, team.Name, team.PhotoPath, convertedSport.Name, convertedSport);

            convertedTeam.Sport           = convertedSport;
            convertedTeam.SportEntityName = team.Sport.Name;
            return(convertedTeam);
        }
        public EncounterEntity ToEntity(Encounter anEncounter)
        {
            SportEntity     sportEntity = sportConverter.ToEntity(anEncounter.Sport);
            EncounterEntity conversion  = new EncounterEntity()
            {
                Id           = anEncounter.Id,
                Date         = anEncounter.Date,
                Commentaries = TransformCommentaries(anEncounter.GetAllCommentaries()),
                SportEntity  = sportEntity,
                HasResult    = anEncounter.HasResult()
            };

            return(conversion);
        }