private void CreateEvaluationDataAscending(string key, EvaluationDataType type, int gameId, List <Actor> actors) { var data = new List <EvaluationData>(); // Each user will have that user's index + 1 amount of EvaluationData (unless singular is defined) // i.e: // users[0] will have 1 EvaluationData of 1 // users[1] will have 2 EvaluationData of 1 each = 2 // users[2] will have 3 EvaluationData of 1 each = 3 // etc for (var actorIndex = 0; actorIndex < actors.Count; actorIndex++) { for (var actorDataIndex = 0; actorDataIndex < actorIndex + 1; actorDataIndex++) { var gameData = new EvaluationData { ActorId = actors[actorIndex].Id, GameId = gameId, Key = key, Value = (actorDataIndex + 1).ToString(), EvaluationDataType = type }; if (type == EvaluationDataType.Float) { gameData.Value = (actorDataIndex * 0.01f).ToString(CultureInfo.InvariantCulture); } else if (type == EvaluationDataType.Boolean) { gameData.Value = (actorDataIndex % 2 == 0).ToString(); } data.Add(gameData); } } _gameDataController.Add(data); }