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); }
public FootballGameProxy(FootballGameEntity entity) : base(new GameId(entity.HomeTeam, entity.AwayTeam, entity.League)) { }