private FeedDto ConvertToDto(TimeLine timeLine, GameModelPost gameDto) { return(new FeedDto { GameDto = gameDto, EventDtos = timeLine.GetElements() .Select(EventDto) .ToList() }); }
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))); }