public async Task <IActionResult> GetLevelConfigurationsByCreatedById(
            [HttpTrigger(AuthorizationLevel.Anonymous, "get", Route = "LevelConfiguration/GetLevelConfigurationsByCreatedById")] HttpRequest req, ILogger log)
        {
            log.LogInformation("C# HTTP trigger function(GetLevelConfigurationsByCreatedById) processed a request.");

            try
            {
                var accessTokenResult = _tokenProvider.ValidateToken(req);
                if (accessTokenResult.Status != AccessTokenStatus.Valid)
                {
                    return(new UnauthorizedResult());
                }

                Guid userAccountId = new Guid(accessTokenResult.Principal.Claims.First(c => c.Type == "UserAccount").Value);

                // possibly can speed this up/less calls by using advanced Dapper features
                var levelConfigurationRepo = new LevelConfigurationRepository();
                var targetZoneRepo         = new TargetZoneRepository();
                var targetRepo             = new TargetRepository();

                var levelConfigurations = levelConfigurationRepo.GetLevelConfigurationsByCreatedById(userAccountId);
                foreach (var levelConfigurationViewModel in levelConfigurations)
                {
                    levelConfigurationViewModel.TargetZone = targetZoneRepo.GetTargetZoneByLevelConfigurationId(levelConfigurationViewModel.LevelConfigurationId);
                    levelConfigurationViewModel.Targets    = targetRepo.GetTargetsByLevelConfigurationId(levelConfigurationViewModel.LevelConfigurationId);
                }

                return(new OkObjectResult(levelConfigurations));
            }
            catch (Exception exception)
            {
                return(new BadRequestObjectResult(exception.Message));
            }
        }