예제 #1
0
        public void GetAllTest()
        {
            DbContextHelper.Init(typeof(CourseDbContext), GlobalSettings.DATABASE.ConnectionString, 8);

            AbsenceRepository repo = new AbsenceRepository();
            Assert.AreEqual(2, repo.GetAll(1).Count);
        }
예제 #2
0
        /// <summary>
        /// Get all of attendances status of the user
        /// </summary>
        /// <returns></returns>
        public string Index()
        {
            AbsenceRepository absenceRepo = new AbsenceRepository();
            var result = absenceRepo.GetAll(Auth.User().Id);

            return resultSetView.Show(result);
        }