In my application I have Lecturers and they have list of Courses they can teach and when I\'m deleting a course I want to remove connection to lecturers. Here\'s the code:>
You can't use Contains with non-primitive values. Do
Contains
Where(l => l.Courses.Select(c => c.CourseId).Contains(courseId)
(or the Id field you use).