public GameModel Create( Game game ) { return new GameModel { AwayTeam = Create( game.AwayTeam ), HomeTeam = Create( game.HomeTeam ), Events = game.Events.Select( Create ).ToList(), GameID = game.ID, StartTime = game.StarTime }; }
public GameEvent Create( Game gameEntity, Player playerEntity, int pointValue ) { return new GameEvent {Game = gameEntity, Player = playerEntity, PointValue = pointValue, UpdatedDate = DateTime.Now}; }