BusinessLogic.Logic.PlayedGames.PlayedGameSaver.CleanupPlayerResultsAndApplicationLinkages C# (CSharp) Метод

CleanupPlayerResultsAndApplicationLinkages() приватный Метод

private CleanupPlayerResultsAndApplicationLinkages ( ApplicationUser currentUser, PlayedGame playedGameWithStuff ) : void
currentUser ApplicationUser
playedGameWithStuff PlayedGame
Результат void
        private void CleanupPlayerResultsAndApplicationLinkages(ApplicationUser currentUser, PlayedGame playedGameWithStuff)
        {
            foreach (var playerGameResult in playedGameWithStuff.PlayerGameResults.ToList())
            {
                _dataContext.DeleteById<PlayerGameResult>(playerGameResult.Id, currentUser);
            }

            foreach (var applicationLinkage in playedGameWithStuff.ApplicationLinkages.ToList())
            {
                _dataContext.DeleteById<PlayedGameApplicationLinkage>(applicationLinkage.Id, currentUser);
            }
        }
    }