@@ -34,7 +34,7 @@ public PlayersController(
3434 IMemoryCache memoryCache )
3535 {
3636 ArgumentNullException . ThrowIfNull ( context ) ;
37- this . context = context ;
37+ this . context = context ;
3838 this . _memoryCache = memoryCache ?? throw new ArgumentNullException ( nameof ( memoryCache ) ) ;
3939 }
4040
@@ -98,6 +98,7 @@ async Task<ApiResult<PlayerDto>> IPlayersApi.GetPlayer(Guid playerId, PlayerEnti
9898 if ( playerEntityOptions . HasFlag ( PlayerEntityOptions . ProtectedNames ) )
9999 player . ProtectedNames = await context . ProtectedNames
100100 . AsNoTracking ( )
101+ . Include ( pn => pn . Player )
101102 . Include ( pn => pn . CreatedByUserProfile )
102103 . Where ( pn => pn . PlayerId == player . PlayerId )
103104 . OrderByDescending ( pn => pn . CreatedOn )
@@ -306,6 +307,7 @@ async Task<ApiResult<PlayerDto>> IPlayersApi.GetPlayerByGameType(GameType gameTy
306307 if ( playerEntityOptions . HasFlag ( PlayerEntityOptions . ProtectedNames ) )
307308 player . ProtectedNames = await context . ProtectedNames
308309 . AsNoTracking ( )
310+ . Include ( pn => pn . Player )
309311 . Include ( pn => pn . CreatedByUserProfile )
310312 . Where ( pn => pn . PlayerId == player . PlayerId )
311313 . OrderByDescending ( pn => pn . CreatedOn )
@@ -2063,4 +2065,3 @@ FROM CONTAINSTABLE(PlayerAlias, (Name), {ftSearch}) ft
20632065}
20642066
20652067#endregion
2066-
0 commit comments