public void UpdateAttendance(DateTime date, int classId, List <List <BCAttendance> > attendance, List <BCTeacherSubject> teacher)
        {
            _attendanceRepo.DeleteDaysAttendance(date, classId);

            int index = 0;
            List <BCAttendance> masterList = new List <BCAttendance>();

            foreach (List <BCAttendance> a in attendance)
            {
                int id = teacher[index].BCTeacherSubjectId;

                foreach (BCAttendance status in a)
                {
                    status.BCTeacherSubjectId = id;
                    status.Date = date;
                    masterList.Add(status);
                }
                index++;
            }

            masterList = masterList.Where(a => a.BCTeacherSubjectId != 0).ToList();

            _attendanceRepo.AddAttendance(masterList);
        }