public void GetWithIncludeAsync_Attendance_GetsCorrectly() { using var context = new UniversityContext(builder.Options); var repository = new AttendanceRepository(context); var attendance = new Attendance() { StudentId = 1, LessonInScheduleId = 1, IsPresent = true }; var res = repository.AddAsync(attendance).Result; var attendanceFromDb = repository.GetByIdWithIncludeAsync(res.Id).Result; Assert.Multiple(() => { Assert.That(attendanceFromDb.LessonInSchedule, Is.Not.EqualTo(null)); Assert.That(attendanceFromDb.Student, Is.Not.EqualTo(null)); }); }