public async Task <IActionResult> InsertQuestionAsync(int id, [FromBody] Question q) { if (ModelState.IsValid) { _sc.Addq(id, q); if (await _sc.SaveChangesAsync()) { return(Created($"api/Formulaire/Questions/{q.quest}", q)); } } return(BadRequest("failed to save the trip")); }