public void DeleteAsync_Attendance_DeletesCorrectly() { 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; repository.DeleteAsync(res.Id).Wait(); var deletedAttendance = repository.GetByIdAsync(res.Id).Result; Assert.That(deletedAttendance, Is.EqualTo(null)); }