public async Task <HttpResponseMessage> AddQuestion(Questionwithchoice questionwithchoice)
        {
            var content = Utilities.GetRequestContent(questionwithchoice);
            HttpResponseMessage response = await _httpClient.PostAsync($"Admin/AddQuestion", content);

            return(response);
        }
예제 #2
0
        public IActionResult AddQuestion(int id)
        {
            Questionwithchoice questionwithchoice = new Questionwithchoice();

            questionwithchoice.Questions        = new Questions();
            questionwithchoice.Questions.TestId = id;
            return(View(questionwithchoice));
        }
예제 #3
0
        public async Task <IActionResult> AddQuestion(Questionwithchoice questionwithchoice)
        {
            await _apiHandler.AddQuestion(questionwithchoice);

            return(RedirectToAction("AddQues", new { id = questionwithchoice.Questions.TestId }));
        }