예제 #1
0
 private FeedDto ConvertToDto(TimeLine timeLine, GameModelPost gameDto)
 {
     return(new FeedDto
     {
         GameDto = gameDto,
         EventDtos = timeLine.GetElements()
                     .Select(EventDto)
                     .ToList()
     });
 }
예제 #2
0
        public ActionResult GetTimeline([FromJson] GameModelPost gameModelPost)
        {
            string homeTeam = gameModelPost.HomeTeam;
            string awayTeam = gameModelPost.AwayTeam;
            string league   = gameModelPost.League;
            string hashTag  = gameModelPost.HashTag;

            var gameId   = new GameId(homeTeam, awayTeam, league);
            var timeLine = _service.BuildTimeLine(gameId, hashTag);

            return(View("Index", ConvertToDto(timeLine, gameModelPost)));
        }