public IHttpActionResult AddQuestion([FromUri] int ClassID, [FromUri] int SubjectID, [FromUri] int ConceptID, [FromBody] Question question) { try { if (ModelState.IsValid) { return(Content(HttpStatusCode.OK, new DataModel() { HttpStatusCode = System.Net.HttpStatusCode.OK, Exception = null, Data = professorService.AddOrUpdateQuestion(question, ConceptID, SubjectID, ClassID) })); } else { return(BadRequest(ModelState)); } } catch (Exception ex) { return(InternalServerError(ex)); } }