public static DuelViewModel Execute(DuelViewModel duelCharacterInfo, CharacterClassContext db) { int totalPlayers = duelCharacterInfo.PlayersTotal; //Duel the amount of times requested for (int i = 0; i < duelCharacterInfo.DuelsRequested; i++) { int idToFind = -1; //As long as the player info is null, we want to repeat and select a new one, it would be null because the random number generated belongs to a deleted account while (idToFind <= 0) { idToFind = CheckIfPlayerExists(totalPlayers, db, duelCharacterInfo.DuelInitiator); }