Exemplo n.º 1
0
 public ActionResult Index()
 {
     if (loginStatus() == false)
     {
         return Redirect("Login");
     }
     ExamModel model = new ExamModel();
     List<ExamEntity> list = model.getAllExam();
     ViewBag.examList = list;
     return View();
 }
Exemplo n.º 2
0
        public void TestGetAllExam()
        {
            ExamModel model = new ExamModel();
            List<ExamEntity> list = model.getAllExam();
            Assert.IsNotNull(list);
            
            foreach (ExamEntity exam in list)
            {
                Console.WriteLine(string.Format("id:{0},name:{1}",exam.id,exam.name));
            }


        }