public async Task <HttpResponseMessage> AddQuestion(Questionwithchoice questionwithchoice) { var content = Utilities.GetRequestContent(questionwithchoice); HttpResponseMessage response = await _httpClient.PostAsync($"Admin/AddQuestion", content); return(response); }
public IActionResult AddQuestion(int id) { Questionwithchoice questionwithchoice = new Questionwithchoice(); questionwithchoice.Questions = new Questions(); questionwithchoice.Questions.TestId = id; return(View(questionwithchoice)); }
public async Task <IActionResult> AddQuestion(Questionwithchoice questionwithchoice) { await _apiHandler.AddQuestion(questionwithchoice); return(RedirectToAction("AddQues", new { id = questionwithchoice.Questions.TestId })); }