コード例 #1
0
    // GET: AnswerQuestion
    public ViewResult AnswerQuestion()
    {
        QuestionContext qt       = new QuestionContext();
        ParentModel     question = new ParentModel(false);

        try
        {
            question = qt.GetQuestionOfTheDay();
        }
        catch (MissingMemberException)
        {
            question.Question.Question = "There isn't question of the day ;(";
        }
        catch (Exception)
        {
            throw new Exception();
        }

        return(View(question));
    }