public async Task <IActionResult> OnGetAsync(int?numberOfQuestionsLeft, int numberOfAnswers, int?questionId) { if (questionId == null) { return(NotFound()); } Question = await _databaseLogic.GetQuestion(questionId); await _databaseLogic.GetAllSurveys(); if (Question.Survey != null) { Survey = await _databaseLogic.GetSurvey(Question.Survey.Id); } NumberOfAnswersLeft = numberOfAnswers; NumberOfQuestionsLeft = numberOfQuestionsLeft; if (Question == null) { return(NotFound()); } return(Page()); }
public async Task <IActionResult> OnGetAsync(int?id) { if (id == null) { return(NotFound()); } Survey = await _databaseLogic.GetSurvey(id); if (Survey == null) { return(NotFound()); } return(Page()); }
public async Task <IActionResult> OnGetAsync(int?numberOfQuestionsLeft, int?surveyId) { if (surveyId == null) { return(NotFound()); } Survey = await _databaseLogic.GetSurvey(surveyId); NumberOfQuestionsLeft = numberOfQuestionsLeft; if (Survey == null) { return(NotFound()); } return(Page()); }
public async Task <IActionResult> OnGetAsync(int?surveyId) { if (surveyId == null) { return(NotFound()); } Survey = await _databaseLogic.GetSurvey(surveyId); await _databaseLogic.GetAllQuestions(); if (Survey == null) { return(NotFound()); } return(Page()); }