public IActionResult CreateQuestion([FromBody] RequestCreateQuestion question) { Question entity; if (ModelState.IsValid) { entity = questionServices.CreateQuestion(question); questionServices.Commit(); question.ToModel(entity); return(Created($"api/questiontypes/{entity.Id}", question)); } else { return(BadRequest()); } }