public IHttpActionResult GetQuestion(int id) { try { question retrieved = bllService.GetQuestion(id); if (retrieved != null) { question question = new question() { answerType = retrieved.answerType, complexity = retrieved.complexity, answer = retrieved.answer, marks = retrieved.marks, option1 = retrieved.option1, option2 = retrieved.option2, option3 = retrieved.option3, option4 = retrieved.option4, testid = retrieved.testid, topicID = retrieved.topicID, questionID = retrieved.questionID, questionText = retrieved.questionText, }; return(Ok(question)); } else { return(BadRequest("Question Not Found")); } } catch (Exception) { throw; } }