public async Task <HttpResponseMessage> GetFromSession(int id)
        {
            IStateFactory <question, QuestionsCollectionState> _stateFactory = new QuestionsCollectionFactory(new QuestionLinkFactory(Request));
            var instace  = QuestionService.GetInstance();
            var question = await instace.GetQuestionsFromSession(id);

            if (question.Success)
            {
                var res = question.Result.Select <question, QuestionsCollectionState>(i => _stateFactory.Create(i));
                return(Request.CreateResponse(HttpStatusCode.OK, new { questions = res }, "application/json"));
            }
            return(Request.CreateResponse(HttpStatusCode.NotFound, new NotFound(Request.RequestUri, question.Message), "application/problem+json"));
        }
 public SessionSingleFactory(HttpRequestMessage Request)
 {
     _links          = new SessionLinkFactory(Request);
     questionFactory = new QuestionsCollectionFactory(new QuestionLinkFactory(Request));
     eventFactory    = new EventsCollectionFactory(new EventLinkFactory(Request));
 }