private static EventData ConvertToEventData(FootballGameEntity gameEntity, MatchEvent @event)
 {
     return(new EventData
     {
         FootballGameId = gameEntity.Id,
         SerializedEvent = JsonConvert.SerializeObject(@event),
         Type = @event.GetType().FullName
     });
 }
        private static FootballGameEntity ConvertToEntity(FootballGame game)
        {
            var gameEntity = new FootballGameEntity
            {
                AwayTeam = game.AwayTeam,
                HomeTeam = game.HomeTeam,
                League   = game.League
            };

            return(gameEntity);
        }
예제 #3
0
 public FootballGameProxy(FootballGameEntity entity)
     : base(new GameId(entity.HomeTeam, entity.AwayTeam, entity.League))
 {
 }