public IHttpActionResult GetquestionSet() { var questions = new List <Question>(); foreach (var service in _questionServices) { questions.AddRange(service.GenerateQuestions(NumberOfQuestions)); } var questionSet = new QuestionSet { Id = Guid.NewGuid().ToString(), Questions = questions }; _cacheService.AddUpdateQuestionSetInCache(questionSet); return(Created($"api/Maths/{questionSet.Id}", questionSet)); }