R – subsonic ActiveRecord: Lambda Parameter not in scope

activerecordlambdasubsonic

I am trying to delete a list of albums from an Album table. Below is the syntax I am using, but it fails saying Lambda Parameter not in scope:

Album.Delete(x => (ListOfIds).Contains(x.Id));

What am I missing here?

Best Answer

The Contains method isn't currently supported in SubSonic's linq implementation. I've posted an alternative method of doing this in response to your other question here