public IHttpActionResult PostOpenEndedQuestion(OpenEndedQuestionViewModel openendedQuestionViewModeluestion)
        {
            if (!ModelState.IsValid)
            {
                return BadRequest(ModelState);
            }
            var openendedquestionModel = _openEndedQuestionMap.CreateModel(openendedQuestionViewModeluestion);
            _db.OpenEndedQuestions.Add(openendedquestionModel);
            _db.SaveChanges();

            return CreatedAtRoute("DefaultApi", new { id = openendedquestionModel.Id }, _openEndedQuestionMap.CreateViewModel(openendedquestionModel));
        }
        public OpenEndedQuestion CreateModel(OpenEndedQuestionViewModel viewModel)
        {
            return new OpenEndedQuestion()
            {
                Id = viewModel.Id,
                Description = viewModel.Description,
                Text =  viewModel.Text,
                Answers = string.Join("|", viewModel.Answers),
                Timestamp = viewModel.Timestamp

            };
        }
        public IHttpActionResult PutOpenEndedQuestion(int id, OpenEndedQuestionViewModel openendedquestionViewModel)
        {
            if (!ModelState.IsValid)
            {
                return BadRequest(ModelState);
            }

            if (id != openendedquestionViewModel.Id)
            {
                return BadRequest();
            }
            _db.Entry(_openEndedQuestionMap.CreateModel(openendedquestionViewModel)).State = EntityState.Modified;

            try
            {
                _db.SaveChanges();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!OpenEndedQuestionExists(id))
                {
                    return NotFound();
                }
                throw;
            }

            return StatusCode(HttpStatusCode.NoContent);
        }