public UserAttendanceRepositoryMock() { Attendances = new List <Attendance> { Attendance.CreateAttendance(1, new Guid(), new Guid().ToString(), 10, 10, false) }; }
public void StartLaboratoryBasedOnValue(Guid factionId, int labValue) { var laboratory = Guid.NewGuid(); var studentList = _service.GetUsersByFactionId(factionId); var getUser = _userRepo.GetAllUsers().FirstOrDefault(user => user.FactionId == factionId); var check = _attendance.GetAllAttendances() .Where(attend => attend.UserId == getUser.Id && attend.LaboratoryNumber == labValue).ToList().Count; if (check == 0) { foreach (var students in studentList) { _attendance.CreateAttendance( Attendance.CreateAttendance( labValue, laboratory, students.Id, 0, 0, false )); } } }