public void RemoveById(long studentId) { IQueryable <StudentLesson> deleteThese = _dbContext.StudentLessons.Where(x => x.StudentId == studentId); _dbContext.StudentLessons.RemoveRange(deleteThese); _dbContext.SaveChanges(); }